Méthode | Description | |
---|---|---|
__construct ( Zend\Expressive\Template\TemplateRendererInterface $renderer = null, null | string $template404 = 'error::404', null | string $templateError = 'error::error', Psr\Http\Message\ResponseInterface $originalResponse = null ) | ||
__invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, null | mixed $err = null ) : Psr\Http\Message\ResponseInterface | Final handler for an application. | |
setOriginalResponse ( Psr\Http\Message\ResponseInterface $response ) | Set the original response for comparisons. |
Méthode | Description | |
---|---|---|
handleError ( mixed $error, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Handle a non-exception error. | |
handleException ( Throwable $exception, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Prepare the exception for display. |
Méthode | Description | |
---|---|---|
create404 ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Create a 404 response. | |
handleErrorResponse ( mixed $error, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Handle an error response. | |
handlePotentialSuccess ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Handle a non-error condition. | |
marshalReceivedResponse ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | Determine whether to return the given response, or a 404. |
public __construct ( Zend\Expressive\Template\TemplateRendererInterface $renderer = null, null | string $template404 = 'error::404', null | string $templateError = 'error::error', Psr\Http\Message\ResponseInterface $originalResponse = null ) | ||
$renderer | Zend\Expressive\Template\TemplateRendererInterface | Template renderer. |
$template404 | null | string | Template to use for 404 responses. |
$templateError | null | string | Template to use for general errors. |
$originalResponse | Psr\Http\Message\ResponseInterface | Original response (used to calculate if the response has changed during middleware execution). |
public __invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, null | mixed $err = null ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$err | null | mixed | |
Résultat | Psr\Http\Message\ResponseInterface |
protected handleError ( mixed $error, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | ||
$error | mixed | |
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
Résultat | Psr\Http\Message\ResponseInterface |
protected handleException ( Throwable $exception, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface | ||
$exception | Throwable | |
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
Résultat | Psr\Http\Message\ResponseInterface |
public setOriginalResponse ( Psr\Http\Message\ResponseInterface $response ) | ||
$response | Psr\Http\Message\ResponseInterface |