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.
callable
A closure or invokable object.
__construct(callable $callable)
Constructor
callable
$callable A closure.
getCallable()
callable
process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler)
Run the internal double pass callable to process an incoming server request.
\Psr\Http\Message\ServerRequestInterface
$request Request instance.
\Psr\Http\Server\RequestHandlerInterface
$handler Request handler instance.
\Psr\Http\Message\ResponseInterface
A 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.1/class-Cake.Http.Middleware.DoublePassDecoratorMiddleware.html