Fr3nch13/CakePHP Utilities

ClosureDecoratorMiddleware
in package
implements MiddlewareInterface

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.

Table of Contents

Interfaces

MiddlewareInterface
Participant in processing a server request and response.

Properties

$callable  : Closure
A Closure.

Methods

__construct()  : mixed
Constructor
process()  : ResponseInterface
Run the callable to process an incoming server request.

Properties

Methods

__construct()

Constructor

public __construct(Closure $callable) : mixed
Parameters
$callable : Closure

A closure.


        
On this page

Search results