Decorate double-pass middleware as PSR-15 middleware.
The callable can be a closure with the following signature:
function (
ServerRequestInterface $request,
ResponseInterface $response,
callable $next
): ResponseInterface or a class with __invoke() method with same signature as above.
Neither the arguments nor the return value need be typehinted.
callableA closure or invokable object.
Constructor
Run the internal double pass callable to process an incoming server request.
__construct(callable $callable)
Constructor
callable $callable A closure.
getCallable(): callable
callableprocess(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface
Run the internal double pass callable to process an incoming server request.
Processes an incoming server request in order to produce a response. If unable to produce the response itself, it may delegate to the provided request handler to do so.
ServerRequestInterface $request Request instance.
RequestHandlerInterface $handler Request handler instance.
Psr\Http\Message\ResponseInterfaceA closure or invokable object.
callable
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Http.Middleware.DoublePassDecoratorMiddleware.html