2017 © Pedro Peláez
 

library optimus-middleware

PSR-15/PSR-7 compliant middleware using jenssegers/optimus

image

icanhazstring/optimus-middleware

PSR-15/PSR-7 compliant middleware using jenssegers/optimus

  • Sunday, May 20, 2018
  • by icanhazstring
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

expressive-optimus-middleware

PSR-15 compliant middleware using jenssegers/optimus, (*1)

Build Status, (*2)

Install

You can install the optimus-middleware library with composer:, (*3)

$ composer require icanhazstring/optimus-middleware

Configuration

General dependencies

For the middleware to work, your Container needs a dependency to Optimus. You need to provide an instance with the configuration you need., (*4)

How to configure see: https://github.com/jenssegers/optimus, (*5)

Using expressive

Include the OptimusConfigProvider inside your config/config.php:, (*6)

$aggregator = new ConfigAggregator([
    ...
    \icanhazstring\Middleware\OptimusConfigProvider::class,
    ...
]);

Make sure the OptimusConfigProvider is included before your autoload files!, (*7)

Change decoded attributes

If you want to change the attributes the middleware should decode, simply provide the OptimusMiddleware::CONFIG_KEY inside your autoload configuration., (*8)

return [
    \icanhazstring\Middleware\OptimusMiddleware::CONFIG_KEY => ['id']
];

The Versions

20/05 2018

dev-master

9999999-dev

PSR-15/PSR-7 compliant middleware using jenssegers/optimus

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar icanhazstring

20/05 2018