class RouteList implements Router

The router broker.

Properties

protected RouteList|null $parent

Methods

__construct()

No description

array|null
match(IRequest $httpRequest)

Maps HTTP request to an array.

string|null
constructUrl(array $params, UrlScript $refUrl)

Constructs absolute URL from array.

void
warmupCache()

No description

add(Router $router, int $flags = 0)

Adds a router.

void
prepend(Router $router, int $flags = 0)

Prepends a router.

void
modify(int $index, Router|null $router)

No description

addRoute(string $mask, array $metadata = [], int $flags = 0)

No description

withDomain(string $domain)

Returns an iterator over all routers.

withPath(string $path)

No description

end()

No description

array
getRouters()

No description

array
getFlags()

No description

string|null
getDomain()

No description

string|null
getPath()

No description

Details

at line 44
__construct()

No description

at line 52
array|null match(IRequest $httpRequest)

Maps HTTP request to an array.

Parameters

IRequest $httpRequest

Return Value

array|null

at line 85
string|null constructUrl(array $params, UrlScript $refUrl)

Constructs absolute URL from array.

Parameters

array $params
UrlScript $refUrl

Return Value

string|null

at line 125
void warmupCache()

No description

Return Value

void

at line 182
RouteList add(Router $router, int $flags = 0)

Adds a router.

Parameters

Router $router
int $flags

Return Value

RouteList

at line 193
void prepend(Router $router, int $flags = 0)

Prepends a router.

Parameters

Router $router
int $flags

Return Value

void

at line 201
protected void modify(int $index, Router|null $router)

internal  
 

No description

Parameters

int $index
Router|null $router

Return Value

void

at line 220
RouteList addRoute(string $mask, array $metadata = [], int $flags = 0)

No description

Parameters

string $mask

e.g. '//<id \d{1,3}>'

array $metadata

default values or metadata

int $flags

Return Value

RouteList

at line 231
RouteList withDomain(string $domain)

Returns an iterator over all routers.

Parameters

string $domain

Return Value

RouteList

at line 245
RouteList withPath(string $path)

No description

Parameters

string $path

Return Value

RouteList

at line 259
RouteList end()

No description

Return Value

RouteList

at line 268
array getRouters()

No description

Return Value

array

at line 277
array getFlags()

No description

Return Value

array

at line 283
string|null getDomain()

No description

Return Value

string|null

at line 289
string|null getPath()

No description

Return Value

string|null

Traits

SmartObject