RouteDefinitionProvider
class RouteDefinitionProvider (View source)
Provides route definitions and matching arrays for the router.
Properties
protected int[][] | $staticRoutes | ||
protected int[][] | $segmentCounts | ||
protected int[][][] | $segmentValues | ||
protected array[] | $routeDefinitions | ||
protected int[] | $routesByName |
Methods
Returns PHP code for cached RouteDefinitionProvider that can be stored in file and included.
Returns route ids for routes with specific static path.
Returns route ids with specific segment count.
Returns route ids with specific value for specific segment.
Returns a route definition by a specific id.
Returns a route definition by the name of the route.
Details
at line 32
void
addRouteDefinition(RouteDefinition $definition)
Adds a new route definition.
at line 63
string
getCacheFile()
Returns PHP code for cached RouteDefinitionProvider that can be stored in file and included.
at line 89
array
getRoutesByStaticPath(string $path)
Returns route ids for routes with specific static path.
at line 99
array
getRoutesBySegmentCount(int $count)
Returns route ids with specific segment count.
at line 110
array
getRoutesBySegmentValue(int $segment, string $value)
Returns route ids with specific value for specific segment.
at line 120
RouteDefinition
getRouteDefinition(int $routeId)
Returns a route definition by a specific id.
at line 134
RouteDefinition
getRouteDefinitionByName(string $name)
Returns a route definition by the name of the route.