Symfony2 API
Class

Symfony\Component\Routing\CompiledRoute

class CompiledRoute implements Serializable

CompiledRoutes are returned by the RouteCompiler class.

Methods

__construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string|null $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array())

Constructor.

serialize()

{@inheritdoc}

unserialize($serialized)

{@inheritdoc}

string getStaticPrefix()

Returns the static prefix.

string getRegex()

Returns the regex.

string|null getHostRegex()

Returns the host regex

array getTokens()

Returns the tokens.

array getHostTokens()

Returns the host tokens.

array getVariables()

Returns the variables.

array getPathVariables()

Returns the path variables.

array getHostVariables()

Returns the host variables.

Details

at line 42
public __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string|null $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array())

Constructor.

Parameters

string $staticPrefix The static prefix of the compiled route
string $regex The regular expression to use to match this route
array $tokens An array of tokens to use to generate URL for this route
array $pathVariables An array of path variables
string|null $hostRegex Host regex
array $hostTokens Host tokens
array $hostVariables An array of host variables
array $variables An array of variables (variables defined in the path and in the host patterns)

at line 57
public serialize()

{@inheritdoc}

at line 74
public unserialize($serialized)

{@inheritdoc}

Parameters

$serialized

at line 92
public string getStaticPrefix()

Returns the static prefix.

Return Value

string The static prefix

at line 102
public string getRegex()

Returns the regex.

Return Value

string The regex

at line 112
public string|null getHostRegex()

Returns the host regex

Return Value

string|null The host regex or null

at line 122
public array getTokens()

Returns the tokens.

Return Value

array The tokens

at line 132
public array getHostTokens()

Returns the host tokens.

Return Value

array The tokens

at line 142
public array getVariables()

Returns the variables.

Return Value

array The variables

at line 152
public array getPathVariables()

Returns the path variables.

Return Value

array The variables

at line 162
public array getHostVariables()

Returns the host variables.

Return Value

array The variables