class Route implements Router

The bidirectional route is responsible for mapping HTTP request to an array for dispatch and vice-versa.

Constants

VALUE

key used in metadata Route::__construct

PATTERN

key used in metadata Route::__construct

FILTER_IN

key used in metadata Route::__construct

FILTER_OUT

key used in metadata Route::__construct

FILTER_TABLE

key used in metadata Route::__construct

FILTER_STRICT

key used in metadata Route::__construct

private DEFAULT

key used in metadata

private FIXITY

key used in metadata

private FILTER_TABLE_OUT

key used in metadata

private HOST

url type

private PATH

url type

private RELATIVE

url type

private IN_QUERY

fixity types - has default value and is:

private IN_PATH

fixity types - has default value and is:

private CONSTANT

fixity types - has default value and is:

Properties

protected array $defaultMeta

Methods

__construct(string $mask, array $metadata = [])

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.

string
getMask()

Returns mask.

array
getDefaults()

Returns default values.

array
getMetadata()

No description

array
getConstantParameters()

No description

static string
param2path(string $s)

Url encode.

Details

at line 88
__construct(string $mask, array $metadata = [])

No description

Parameters

string $mask

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

array $metadata

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

Maps HTTP request to an array.

Parameters

IRequest $httpRequest

Return Value

array|null

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

Constructs absolute URL from array.

Parameters

array $params
UrlScript $refUrl

Return Value

string|null

at line 518
string getMask()

Returns mask.

Return Value

string

at line 527
array getDefaults()

Returns default values.

Return Value

array

at line 540
protected array getMetadata()

internal  
 

No description

Return Value

array

at line 547
array getConstantParameters()

internal  
 

No description

Return Value

array

at line 588
static string param2path(string $s)

Url encode.

Parameters

string $s

Return Value

string

Traits

Strict class for better experience.