Свойство | Тип | Описание | |
---|---|---|---|
$c | |||
$m | (c)ondition | ||
$p | (s)tatic children | ||
$s | (m)ethods |
Метод | Описание | |
---|---|---|
__set_state ( $array ) | ||
addRoute ( $app, Route $route, $prefix ) | Used to add a route to the routing tree. | |
filterPath ( $input ) | ||
findRouteFor ( Request $request ) : RoutingResult | Traverses children recursively to find a matching route. First looks to see if a static (non-parametric, i.e. /this_is_static/ vs. /$this_is_dynamic/) match exists. If not, we match against dynamic children. We reverse and step backwards through the array because $index > 0 is less costly than $index < count($parts) in PHP. | |
getMethods ( ) | ||
getParametricPaths ( ) | ||
getStaticPaths ( ) | ||
matches ( $path ) |
Метод | Описание | |
---|---|---|
addRouteRecursively ( &$pathParts, $index, $route ) : FindRouteResult | The recursive method powering addRouteFor(Request). | |
findRouteRecursively ( &$pathParts, $index, &$method ) : RoutingResult | The recursive method powering findRouteFor(Request). | |
getRevesedPathParts ( $path ) | Explodes a string by forward slashes, removes empty first/last node and finally reverses the array. |
public addRoute ( $app, Route $route, $prefix ) | ||
$route | Route |
public findRouteFor ( Request $request ) : RoutingResult | ||
$request | Request | |
Результат | RoutingResult |