Runner
in package
implements
RequestHandlerInterface
Executes the middleware queue and provides the `next` callable that allows the queue to be iterated.
Table of Contents
Interfaces
- RequestHandlerInterface
- Handles a server request and produces a response.
Properties
- $fallbackHandler : RequestHandlerInterface|null
- Fallback handler to use if middleware queue does not generate response.
- $queue : MiddlewareQueue
- The middleware queue being run.
Methods
- handle() : ResponseInterface
- Handle incoming server request and return a response.
- run() : ResponseInterface
Properties
$fallbackHandler
Fallback handler to use if middleware queue does not generate response.
protected
RequestHandlerInterface|null
$fallbackHandler
$queue
The middleware queue being run.
protected
MiddlewareQueue
$queue
Methods
handle()
Handle incoming server request and return a response.
public
handle(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
The server request
Return values
ResponseInterface —An updated response
run()
public
run(MiddlewareQueue $queue, ServerRequestInterface $request[, RequestHandlerInterface|null $fallbackHandler = null ]) : ResponseInterface
Parameters
- $queue : MiddlewareQueue
-
The middleware queue
- $request : ServerRequestInterface
-
The Server Request
- $fallbackHandler : RequestHandlerInterface|null = null
-
Fallback request handler.
Return values
ResponseInterface —A response object