class ErrorPages

Properties

protected HeadData $defaults
protected HeadData> $statuses

Methods

__construct(TagRegistry $registry, Closure $define)

Create the error page definitions.

defaults(mixed ...$head)

Define head metadata for every error page, using either named route-attribute values or a single head builder callback.

status(int $status, mixed ...$head)

Define head metadata for a specific error status, using either named route-attribute values or a single head builder callback.

HeadData|null
forStatus(int $status)

Get the merged error head data for a status, or null when none is defined.

apply(HeadData $base, array $head)

Apply a callback or route attributes to the given head data.

Details

at line 23
__construct(TagRegistry $registry, Closure $define)

Create the error page definitions.

Parameters

TagRegistry $registry
Closure $define

at line 36
ErrorPages defaults(mixed ...$head)

Define head metadata for every error page, using either named route-attribute values or a single head builder callback.

On the shared manager's error pages, these defaults apply to every request in the worker.

Parameters

mixed ...$head

Return Value

ErrorPages

at line 50
ErrorPages status(int $status, mixed ...$head)

Define head metadata for a specific error status, using either named route-attribute values or a single head builder callback.

On the shared manager's error pages, these definitions apply to every request in the worker.

Parameters

int $status
mixed ...$head

Return Value

ErrorPages

at line 61
HeadData|null forStatus(int $status)

Get the merged error head data for a status, or null when none is defined.

Parameters

int $status

Return Value

HeadData|null

at line 75
protected HeadData apply(HeadData $base, array $head)

Apply a callback or route attributes to the given head data.

Parameters

HeadData $base
array $head

Return Value

HeadData