kispiox / middleware
A middleware component for Kispiox
dev-master
2018-05-22 08:14 UTC
Requires
- mattferris/events: ~0.4
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is not auto-updated.
Last update: 2024-11-10 05:24:51 UTC
README
use Kispiox\Middleware\MiddlewareDispatcher; use MattFerris\HttpRouting\Dispatcher; use Zend\Diactoros\ServerRequest; $final = new Dispatcher(); $dispatcher = new MiddlewareDispatcher($final, [ $middlewareA, $middlewareB, ... ]); $dispatcher->add($middlewareC); $response = $dispatcher->dispatch(ServerRequest::fromGlobals());