HtmlHttpResponseStrategy
- Full name:
\Codefy\Framework\Http\Middleware\Exception\Strategy\HtmlHttpResponseStrategy - This class implements:
\Codefy\Framework\Http\Middleware\Exception\Strategy\HttpResponseStrategy
Properties
errorView
app
Methods
__construct
public __construct(\Codefy\Framework\View\ErrorViewRenderer $errorView, \Codefy\Framework\Application $app): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$errorView | \Codefy\Framework\View\ErrorViewRenderer | |
$app | \Codefy\Framework\Application |
supports
Parameters:
| Parameter | Type | Description |
|---|---|---|
$e | \Throwable | |
$request | \Psr\Http\Message\ServerRequestInterface |
createResponse
public createResponse(\Throwable $e, \Psr\Http\Message\ServerRequestInterface $request): \Psr\Http\Message\ResponseInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$e | \Throwable | |
$request | \Psr\Http\Message\ServerRequestInterface |
Throws:
Inherited methods
renderErrorView
Parameters:
| Parameter | Type | Description |
|---|---|---|
$t | \Throwable |
Throws:
redirectWithHttpError
protected redirectWithHttpError(\Psr\Http\Message\ServerRequestInterface $request, \Qubus\Exception\Http\HttpException|\Qubus\Exception\Http\Psr7Exception $e): \Psr\Http\Message\ResponseInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface | |
$e | \Qubus\Exception\Http\HttpException|\Qubus\Exception\Http\Psr7Exception |
Throws:
jsonHttpErrorResponse
protected jsonHttpErrorResponse(\Qubus\Exception\Http\Psr7Exception $e): \Psr\Http\Message\ResponseInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$e | \Qubus\Exception\Http\Psr7Exception |
Throws:
redirectWithInternalError
protected redirectWithInternalError(\Psr\Http\Message\ServerRequestInterface $request): \Psr\Http\Message\ResponseInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface |
jsonInternalErrorResponse
Parameters:
| Parameter | Type | Description |
|---|---|---|
$t | \Throwable |
Throws:
normalizeStatusCode
Parameters:
| Parameter | Type | Description |
|---|---|---|
$code | int |
isJson
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface |
getSafeReferrer
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface |
shouldRenderView
Throws:
logException
Parameters:
| Parameter | Type | Description |
|---|---|---|
$t | \Throwable |
Throws: