A middleware dispatcher supporting psr15.
Open Issues: 0
- php: ~7.1
- guzzlehttp/psr7: ^1.4
- psr/http-message: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- php-coveralls/php-coveralls: 2.1.0
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2023-03-08 06:35:51 UTC
A PSR-15 compliant server middleware dispatcher implementation.
The goal of this package is to implement the (currently in draft) PSR-15 spec for middleware in as simple a way as possible.
The entire package MUST be covered by tests.
See PSR-15 spec for more detailed info on implementing middleware.
<?php use JRalph\ServerMiddleware\Dispatcher; $dispatcher = (new Dispatcher()) ->addMiddleware( /** * Implementations of Psr\Http\Server\MiddlewareInterface */ $firstMiddleware, $secondMiddleware, $thirdMiddleware ); /** @var \Psr\Http\Message\ServerRequestInterface $request */ $request = new Request; $response = $dispatcher->handle($request);