class RouteList implements Router

The router broker.

Properties

protected $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 39
__construct()

No description

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

Maps HTTP request to an array.

Parameters

IRequest $httpRequest

Return Value

array|null

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

Constructs absolute URL from array.

Parameters

array $params
UrlScript $refUrl

Return Value

string|null

at line 120
void warmupCache()

No description

Return Value

void

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

Adds a router.

Parameters

Router $router
int $flags

Return Value

RouteList

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

Prepends a router.

Parameters

Router $router
int $flags

Return Value

void

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

internal  
 

No description

Parameters

int $index
Router|null $router

Return Value

void

at line 213
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 234
RouteList withPath(string $path)

No description

Parameters

string $path

Return Value

RouteList

at line 245
RouteList end()

No description

Return Value

RouteList

at line 254
array getRouters()

No description

Return Value

array

at line 263
array getFlags()

No description

Return Value

array

at line 269
string|null getDomain()

No description

Return Value

string|null

at line 275
string|null getPath()

No description

Return Value

string|null

Traits

Strict class for better experience.