Class Runner
Executes the middleware queue and provides the next
callable
that allows the queue to be iterated.
Namespace: Cake\Http
Property Summary
-
$fallbackHandler protected
Psr\Http\Server\RequestHandlerInterface|null
Fallback handler to use if middleware queue does not generate response.
-
$queue protected
Cake\Http\MiddlewareQueue
The middleware queue being run.
Method Summary
Method Detail
handle() ¶ public
handle(ServerRequestInterface $request): Psr\Http\Message\ResponseInterface
Handle incoming server request and return a response.
May call other collaborating code to generate the response.
Parameters
-
ServerRequestInterface
$request The server request
Returns
Psr\Http\Message\ResponseInterface
run() ¶ public
run(Cake\Http\MiddlewareQueue $queue, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Server\RequestHandlerInterface|null $fallbackHandler = null): Psr\Http\Message\ResponseInterface
Parameters
-
Cake\Http\MiddlewareQueue
$queue The middleware queue
-
Psr\Http\Message\ServerRequestInterface
$request The Server Request
-
Psr\Http\Server\RequestHandlerInterface|null
$fallbackHandler optional Fallback request handler.
Returns
Psr\Http\Message\ResponseInterface