class RouteCompiler implements RouteCompilerInterface

RouteCompiler compiles Route instances to CompiledRoute instances.

Constants

REGEX_DELIMITER

SEPARATORS

This string defines the characters that are automatically considered separators in front of optional placeholders (with default and no static text following). Such a single separator can be left out together with the optional placeholder from matching and generating URLs.

VARIABLE_MAXIMUM_LENGTH

The maximum supported length of a PCRE subpattern name http://pcre.org/current/doc/html/pcre2pattern.html#SEC16.

Methods

static CompiledRoute
compile(Route $route)

Compiles the current route instance.

Details

static CompiledRoute compile(Route $route)

Compiles the current route instance.

Parameters

Route $route

Return Value

CompiledRoute A CompiledRoute instance

Exceptions

LogicException If the Route cannot be compiled because the path or host pattern is invalid