kuyoto/psr15-bridge

Provides a PSR-15 middleware double pass decorator.

dev-master / 1.0.x-dev 2020-06-29 04:03 UTC

This package is auto-updated.

Last update: 2024-11-29 05:57:54 UTC


README

Build Status Latest Stable Version License

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.