kuyoto / psr15-bridge
Provides a PSR-15 middleware double pass decorator.
dev-master / 1.0.x-dev
2020-06-29 04:03 UTC
Requires
- php: ^7.2
- psr/http-server-middleware: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16.3
- phpunit/phpunit: ^7.5 || ^8.0
This package is auto-updated.
Last update: 2024-10-29 05:53:42 UTC
README
This package provides a PSR-15 middleware that decorates a callable (double pass) middleware.
Installation
The recommnended way to install this library is through composer:
composer require kuyoto/psr15-bridge
Usage
Decorates an existing callable (double pass) PSR-7 middlewares to a PSR-15 middleware:
use Kuyoto\Psr15\Bridge\DoublePassMiddlewareDecorator; $decorator = new DoublePassMiddlewareDecorator($callableMiddleware, $response);
You can add the resulting middleware objects in a PSR-15 stack.
Testing
composer test
License
The package is an open-sourced software licensed under the MIT License.