CompiledRoute
class CompiledRoute extends CompiledRoute (View source)
A compiled route contains derived information from a route object.
Properties
| protected int | $fit | The fitness of this route. |
|
| protected string | $patternOutline | The pattern outline of this route. |
|
| protected int | $numParts | The number of parts in the path of this route. |
Methods
Constructs a new compiled route object.
Returns the fit of this route.
Returns the number of parts in this route's path.
Returns the pattern outline of this route.
{@inheritdoc}
{@inheritdoc}
Details
__construct(int $fit, string $pattern_outline, int $num_parts, string $staticPrefix, string $regex, array $tokens, array $pathVariables, string|null $hostRegex = NULL, array $hostTokens = [], array $hostVariables = [], array $variables = [])
Constructs a new compiled route object.
This is a ridiculously long set of constructor parameters, but as this object is little more than a collection of values it's not a serious problem. The parent Symfony class does the same, as well, making it difficult to override differently.
int
getFit()
Returns the fit of this route.
See RouteCompiler for a definition of how the fit is calculated.
int
getNumParts()
Returns the number of parts in this route's path.
The string "foo/bar/baz" has 3 parts, regardless of how many of them are placeholders.
string
getPatternOutline()
Returns the pattern outline of this route.
The pattern outline of a route is the path pattern of the route, but normalized such that all placeholders are replaced with %.
array
getOptions()
deprecated
deprecated
Returns the options.
array
getDefaults()
deprecated
deprecated
Returns the defaults.
array
getRequirements()
deprecated
deprecated
Returns the requirements.
array
__serialize()
{@inheritdoc}
void
__unserialize(array $data)
{@inheritdoc}