PHP Class Zend\Stratigility\Middleware\NotFoundHandler

Inheritance: implements Interop\Http\Middleware\ServerMiddlewareInterface
Show file Open project: zendframework/zend-stratigility Class Usage Examples

Public Methods

Method Description
__construct ( Psr\Http\Message\ResponseInterface $responsePrototype )
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Proxy to process()
process ( Psr\Http\Message\ServerRequestInterface $request, Interop\Http\Middleware\DelegateInterface $delegate ) : Psr\Http\Message\ResponseInterface Creates and returns a 404 response.

Method Details

__construct() public method

public __construct ( Psr\Http\Message\ResponseInterface $responsePrototype )
$responsePrototype Psr\Http\Message\ResponseInterface Empty/prototype response to update and return when returning an 404 response.

__invoke() public method

Proxies to process, after first wrapping the $next argument using the CallableDelegateDecorator.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
return Psr\Http\Message\ResponseInterface

process() public method

Creates and returns a 404 response.
public process ( Psr\Http\Message\ServerRequestInterface $request, Interop\Http\Middleware\DelegateInterface $delegate ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface Ignored.
$delegate Interop\Http\Middleware\DelegateInterface Ignored.
return Psr\Http\Message\ResponseInterface