![]() |
VOOZH | about |
class RouteList implements Router
Router collection that tries each router in sequence and caches URL construction lookups.
| protected | $parent |
No description
No description
No description
No description
No description
Builds an internal lookup index of routers grouped by their most discriminating constant parameter.
No description
Creates a Route from the mask and adds it to the list.
Creates a child RouteList scoped to the given domain and adds it to this list.
Creates a child RouteList scoped to the given path prefix and adds it to this list.
Returns all routers in this list.
Returns the flags (e.g. oneWay) for each router in this list.
No description
No description
__construct()
No description
final array|null
match(IRequest $httpRequest)
No description
| IRequest | $httpRequest |
| array|null |
protected IRequest|null
prepareRequest(IRequest $httpRequest)
No description
| IRequest | $httpRequest |
| IRequest|null |
protected array|null
completeParameters(array $params)
No description
| array | $params |
| array|null |
string|null
constructUrl(array $params, UrlScript $refUrl)
No description
| array | $params |
| UrlScript | $refUrl |
| string|null |
void
warmupCache()
Builds an internal lookup index of routers grouped by their most discriminating constant parameter.
Call this before URL generation to improve performance; called automatically on first use.
| void |
void
prepend(Router $router, bool $oneWay = false)
Prepends a router.
protected void
modify(int $index, Router|null $router)
| internal |
No description
| int | $index |
| Router|null | $router |
| void |
RouteList
addRoute(string $mask, array $metadata = [], bool $oneWay = false)
Creates a Route from the mask and adds it to the list.
| string | $mask | e.g. ' |
| array | $metadata | default values or metadata |
| bool | $oneWay |
| RouteList |
RouteList
withDomain(string $domain)
Creates a child RouteList scoped to the given domain and adds it to this list.
RouteList
withPath(string $path)
Creates a child RouteList scoped to the given path prefix and adds it to this list.
RouteList|null
end()
Returns the parent RouteList, used to end a withDomain()/withPath() chain.
| RouteList|null |
array
getRouters()
Returns all routers in this list.
| array |
array
getFlags()
Returns the flags (e.g. oneWay) for each router in this list.
| array |
string|null
getDomain()
No description
| string|null |
string|null
getPath()
No description
| string|null |