class RouteAttributeParser

Constants

HEAD

Properties

static protected int $metadataLayer

Methods

static array
arguments(array $arguments)

Normalize variadic head arguments, unwrapping a single array argument.

static array
metadata(array $attributes)

Wrap head attributes in a cache-friendly route metadata layer.

static array
metadataFromArguments(array $arguments)

Wrap named head arguments in a cache-friendly route metadata layer, discarding arguments that were not provided.

static array
routeMetadata(Route $route)

Get the head attribute layers stored in the route's metadata.

static HeadData
apply(HeadData $head, HeadData|array|null $attributes, TagRegistry $registry)

Apply head attributes on top of the given head data.

static HeadData
fill(HeadData $head, array $attributes, TagRegistry $registry)

Overlay each named attribute's builder onto a copy of the head data.

static bool
isEmptyRouteAttributeValue(mixed $value)

Determine whether an attribute intentionally supplies an empty value.

static array
named(array $attributes)

Validate that all route head attributes are named.

Details

at line 27
static array arguments(array $arguments)

Normalize variadic head arguments, unwrapping a single array argument.

Parameters

array $arguments

Return Value

array

at line 42
static array metadata(array $attributes)

Wrap head attributes in a cache-friendly route metadata layer.

Parameters

array $attributes

Return Value

array

at line 62
static array metadataFromArguments(array $arguments)

Wrap named head arguments in a cache-friendly route metadata layer, discarding arguments that were not provided.

Parameters

array $arguments

Return Value

array

at line 88
static array routeMetadata(Route $route)

Get the head attribute layers stored in the route's metadata.

Parameters

Route $route

Return Value

array

at line 112
static HeadData apply(HeadData $head, HeadData|array|null $attributes, TagRegistry $registry)

Apply head attributes on top of the given head data.

Parameters

HeadData $head
HeadData|array|null $attributes
TagRegistry $registry

Return Value

HeadData

at line 130
static protected HeadData fill(HeadData $head, array $attributes, TagRegistry $registry)

Overlay each named attribute's builder onto a copy of the head data.

Parameters

HeadData $head
array $attributes
TagRegistry $registry

Return Value

HeadData

at line 165
static protected bool isEmptyRouteAttributeValue(mixed $value)

Determine whether an attribute intentionally supplies an empty value.

Parameters

mixed $value

Return Value

bool

at line 176
static protected array named(array $attributes)

Validate that all route head attributes are named.

Parameters

array $attributes

Return Value

array