Skip to content

RouteDefinition

Format-independent description of one route, whatever front-end produced it (today: a #[Route] attribute; later, possibly routing.xml or a programmatic builder).

Every back-end (RouteCollectionBuilder, a compiled-matcher emitter, routes:list) consumes this shape and never needs to know the source.

final class RouteDefinition

Since1.0.0
SourceRouting/Compiler/RouteDefinition.php
PropertyTypeDescription
$actionstringreadonly.
$condition?``stringreadonly.
$defaultsarrayreadonly.
$host?``stringreadonly.
$metaarrayreadonly.
$methodsarrayreadonly.
$modulestringreadonly.
$namestringreadonly.
$outputType?``stringreadonly.
$pathstringreadonly.
$priorityintreadonly.
$requirementsarrayreadonly.
$sourceRefstringreadonly.

public function __construct(string $name, string $path, string $module, string $action, array<string> $methods, array<string, mixed> $defaults, array<string, string> $requirements, ?string $host, ?string $condition, int $priority, ?string $outputType, array{gen_path: string, cut: bool, path: string} $meta, string $sourceRef): mixed

Quiote’s own reverse-routing meta, in the shape Routing::gen() expects.

ParameterTypeDescription
$namestring
$pathstring
$modulestring
$actionstring
$methodsarray``<``string``>
$defaultsarray``<``string``, ``mixed``>
$requirementsarray``<``string``, ``string``>
$host?``string
$condition?``string
$priorityint
$outputType?``string
$metaarray{gen_path: string, cut: bool, path: string}Quiote’s own reverse-routing meta, in the shape Routing::gen() expects.
$sourceRefstring

Returns mixed