Http Handler
Simple PSR-15 Http Handler
Installation
Usage
Usage is pretty simple.
The MiddlewareStack
accepts objects that implement Psr\Http\Server\MiddlewareInterface
and anonymous functions.
Middleware Priorities
An optional second argument may be passed to the MiddlewareStack
which is for the priority of the middleware. Priorities are ordered in ascending order.
In the above example, the CookieMiddleware
will be processed first and NotFoundMiddleware
will be processed last.
Last updated