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

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 83
string|null constructUrl(array $params, UrlScript $refUrl)

Constructs absolute URL from array.

Parameters

array $params
UrlScript $refUrl

Return Value

string|null

at line 121
void warmupCache()

No description

Return Value

void

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

Adds a router.

Parameters

Router $router
int $flags

Return Value

RouteList

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

Prepends a router.

Parameters

Router $router
int $flags

Return Value

void

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

internal  
 

No description

Parameters

int $index
Router|null $router

Return Value

void

at line 212
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 223
RouteList withDomain(string $domain)

Returns an iterator over all routers.

Parameters

string $domain

Return Value

RouteList

at line 237
RouteList withPath(string $path)

No description

Parameters

string $path

Return Value

RouteList

at line 251
RouteList end()

No description

Return Value

RouteList

at line 260
array getRouters()

No description

Return Value

array

at line 269
array getFlags()

No description

Return Value

array

Traits

Strict class for better experience.