Decorate closures as PSR-15 middleware.
Decorates closures with the following signature:
function (
ServerRequestInterface $request,
RequestHandlerInterface $handler
): ResponseInterface such that it will operate as PSR-15 middleware.
ClosureA Closure.
Constructor
Run the callable to process an incoming server request.
__construct(Closure $callable)
Constructor
Closure $callable A closure.
getCallable(): callable
callableprocess(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface
Run the 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.
Closure
© 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.ClosureDecoratorMiddleware.html