PHP Class Psr7Middlewares\Middleware\Shutdown

Inheritance: use trait Psr7Middlewares\Utils\CallableTrait
Show file Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__construct ( callable | string | null $handler = null ) Constructor.
__invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
defaultHandler ( )

Method Details

__construct() public method

Constructor.
public __construct ( callable | string | null $handler = null )
$handler callable | string | null

__invoke() public method

Execute the middleware.
public __invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
return Psr\Http\Message\ResponseInterface

defaultHandler() public static method

public static defaultHandler ( )