Copied!

AbstractExceptionVisitor

AbstractExceptionVisitor.php : 17

Basic ValueObjectVisitor.

Properties

protected $httpStatusCodes

AbstractExceptionVisitor.php : 24

Mapping of HTTP status codes to their respective error messages.

protected static array<int, string> $httpStatusCodes = [400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => "I'm a teapot", 421 => 'There are too many connections from your internet address', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 509 => 'Bandwidth Limit Exceeded', 510 => 'Not Extended']

protected $requestParser

ValueObjectVisitor.php : 24

URL handler for URL generation.

protected RequestParser $requestParser

protected $router

ValueObjectVisitor.php : 29
protected RouterInterface $router

protected $templateRouter

ValueObjectVisitor.php : 34
protected RouterInterface $templateRouter

Methods

publicsetRequestParser()

ValueObjectVisitor.php : 58
public setRequestParser(RequestParser $requestParser) : mixed

Parameters

Name Type Default value Description
$requestParser RequestParser - -

publicsetRouter()

ValueObjectVisitor.php : 48
public setRouter(RouterInterface $router) : mixed

Parameters

Name Type Default value Description
$router RouterInterface - -

publicsetTemplateRouter()

ValueObjectVisitor.php : 53
public setTemplateRouter(RouterInterface $templateRouter) : mixed

Parameters

Name Type Default value Description
$templateRouter RouterInterface - -

publicvisit()

AbstractExceptionVisitor.php : 77

Visit struct returned by controllers.

public visit(Visitor $visitor, Generator $generator, Exception $data) : void

Parameters

Name Type Default value Description
$visitor Visitor - -
$generator Generator - -
$data Exception - -

protectedcanDisplayExceptionMessage()

AbstractExceptionVisitor.php : 156
protected canDisplayExceptionMessage() : bool

Return values

bool

protectedcanDisplayExceptionTrace()

AbstractExceptionVisitor.php : 146
protected canDisplayExceptionTrace() : bool

Return values

bool

protectedcanDisplayPreviousException()

AbstractExceptionVisitor.php : 151
protected canDisplayPreviousException() : bool

Return values

bool

protectedgenerateErrorCode()

AbstractExceptionVisitor.php : 107
protected generateErrorCode(Generator $generator, Visitor $visitor, Exception $e) : int

Parameters

Name Type Default value Description
$generator Generator - -
$visitor Visitor - -
$e Exception - -

Return values

int

protectedgetErrorDescription()

AbstractExceptionVisitor.php : 122
protected getErrorDescription(Exception $data, int $statusCode) : string

Parameters

Name Type Default value Description
$data Exception - -
$statusCode int - -

Return values

string

protectedgetErrorMessage()

AbstractExceptionVisitor.php : 117
protected getErrorMessage(Exception $data, int $statusCode) : string

Parameters

Name Type Default value Description
$data Exception - -
$statusCode int - -

Return values

string

protectedgetStatus()

AbstractExceptionVisitor.php : 67

Returns HTTP status code.

protected getStatus() : int

Return values

int

protectedgetTranslator()

AbstractExceptionVisitor.php : 141
protected getTranslator() : TranslatorInterface|null

Return values

TranslatorInterface|null

protectedserializeBool()

ValueObjectVisitor.php : 71

Returns a string representation for the given $boolValue.

protected serializeBool(Generator $generator, bool $boolValue) : mixed

Parameters

Name Type Default value Description
$generator Generator - -
$boolValue bool - -

protectedserializeSortField()

ValueObjectVisitor.php : 153

Serializes the given $sortField to a string representation.

protected serializeSortField(int $sortField) : string

Parameters

Name Type Default value Description
$sortField int - -

Return values

string

protectedserializeSortOrder()

ValueObjectVisitor.php : 192

Serializes the given $sortOrder to a string representation.

protected serializeSortOrder(int $sortOrder) : string

Parameters

Name Type Default value Description
$sortOrder int - -

Return values

string

protectedvisitDescriptionsList()

ValueObjectVisitor.php : 93

Visits the given list of $descriptions.

protected visitDescriptionsList(Generator $generator, array<string|int, mixed> $descriptions) : mixed

Parameters

Name Type Default value Description
$generator Generator - -
$descriptions array<string|int, mixed> - -

protectedvisitLimitation()

ValueObjectVisitor.php : 123

Visits a limitation.

protected visitLimitation(Generator $generator, Limitation $limitation) : mixed

Parameters

Name Type Default value Description
$generator Generator - -
$limitation Limitation - -

protectedvisitNamesList()

ValueObjectVisitor.php : 82

Visits the given list of $names.

protected visitNamesList(Generator $generator, array<string|int, mixed> $names) : mixed

Parameters

Name Type Default value Description
$generator Generator - -
$names array<string|int, mixed> - -

protectedvisitTranslatedList()

ValueObjectVisitor.php : 105

Visits a list of translated elements.

protected visitTranslatedList(Generator $generator, array<string|int, mixed> $translatedElements, mixed $listName) : mixed

Parameters

Name Type Default value Description
$generator Generator - -
$translatedElements array<string|int, mixed> - -
$listName mixed - -