RequestHandler
in package
implements
RequestHandlerInterface
PSR-15 request handler class
Wraps a plain closure (Pop's own "what happens when the middleware chain is exhausted" concept) as a PSR-15 terminal request handler.
Tags
Table of Contents
Interfaces
- RequestHandlerInterface
Properties
- $dispatch : Closure
- Dispatch closure
Methods
- __construct() : mixed
- Constructor
- handle() : ResponseInterface
- Handle the request
Properties
$dispatch
Dispatch closure
protected
Closure
$dispatch
Methods
__construct()
Constructor
public
__construct(Closure $dispatch) : mixed
Instantiate the request handler object.
Parameters
- $dispatch : Closure
handle()
Handle the request
public
handle(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface