Download the PHP package codeinc/middleware-dispatcher without Composer
On this page you can find all versions of the php package codeinc/middleware-dispatcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codeinc/middleware-dispatcher
More information about codeinc/middleware-dispatcher
Files in codeinc/middleware-dispatcher
Package middleware-dispatcher
Short Description Code Inc. PSR15 middleware dispatcher
License MIT
Homepage https://github.com/CodeIncHQ/MiddlewareDispatcher
Informations about the package middleware-dispatcher
PSR-15 middleware dispatcher
codeinc/middleware-dispatcher
is a PSR-15 middleware dispatcher. The middleware dispatcher behaves as a PSR-15 RequestHandlerInterface
. It comes in two forms, an abstract class MiddlewareDispatcher
.
If none of middleware added to the dispatcher can process the request, a final request handler is called. By default this request handler is DefaultFinalRequestHandler
which returns a NotFoundResponse
.
Usage
An alternative dispatcher called generator. In this example, the middleware objects are instantiated on the fly. This avoids instantiating unsued middleware objects. If the first middleware is capable of generating a valid response, the next ones will never be instantiated.
Installation
This library is available through Packagist and can be installed using Composer:
License
This library is published under the MIT license (see the LICENSE
file).
All versions of middleware-dispatcher with dependencies
psr/http-server-middleware Version ^1.0
codeinc/psr7-responses Version ^2
codeinc/collection-interface Version ^1.1