RouteList
class RouteList implements Router
Router collection that tries each router in sequence and caches URL construction lookups.
Properties
| protected | $parent |
Methods
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
Details
at line 34
__construct()
No description
at line 43
final array|null
match(IRequest $httpRequest)
No description
at line 59
protected IRequest|null
prepareRequest(IRequest $httpRequest)
No description
at line 90
protected array|null
completeParameters(array $params)
No description
at line 97
string|null
constructUrl(array $params, UrlScript $refUrl)
No description
at line 143
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.
at line 211
void
prepend(Router $router, bool $oneWay = false)
Prepends a router.
at line 219
protected void
modify(int $index, Router|null $router)
| internal |
No description
at line 238
RouteList
addRoute(string $mask, array $metadata = [], bool $oneWay = false)
Creates a Route from the mask and adds it to the list.
at line 248
RouteList
withDomain(string $domain)
Creates a child RouteList scoped to the given domain and adds it to this list.
at line 262
RouteList
withPath(string $path)
Creates a child RouteList scoped to the given path prefix and adds it to this list.
at line 276
RouteList|null
end()
Returns the parent RouteList, used to end a withDomain()/withPath() chain.
at line 286
array
getRouters()
Returns all routers in this list.
at line 296
array
getFlags()
Returns the flags (e.g. oneWay) for each router in this list.
at line 302
string|null
getDomain()
No description
at line 308
string|null
getPath()
No description