class Route implements IRouter

The bidirectional route is responsible for mapping HTTP request to a Request object for dispatch and vice-versa.

Constants

PRESENTER_KEY

MODULE_KEY

internal HOST

internal PATH

internal RELATIVE

VALUE

key used in Route::$styles} or metadata {@link Route::__construct

PATTERN

FILTER_IN

FILTER_OUT

FILTER_TABLE

FILTER_STRICT

internal OPTIONAL

internal PATH_OPTIONAL

internal CONSTANT

Properties

static deprecated $defaultFlags
static array $styles

Methods

__construct($mask, $metadata = [], $flags = 0)

No description

Request|null
match(IRequest $httpRequest)

Maps HTTP request to a Request object.

string|null
constructUrl(Request $appRequest, Url $refUrl)

Constructs absolute URL from Request object.

string
getMask()

Returns mask.

array
getDefaults()

Returns default values.

int
getFlags()

Returns flags.

string[]|null
getTargetPresenters()

Proprietary cache aim.

static string
action2path($s)

camelCaseAction name -> dash-separated.

static string
path2action($s)

dash-separated -> camelCaseAction name.

static string
presenter2path($s)

PascalCase:Presenter name -> dash-and-dot-separated.

static string
path2presenter($s)

dash-and-dot-separated -> PascalCase:Presenter name.

static string
param2path($s)

Url encode.

Details

at line 123
__construct($mask, $metadata = [], $flags = 0)

No description

Parameters

$mask
$metadata
$flags

at line 159
Request|null match(IRequest $httpRequest)

Maps HTTP request to a Request object.

Parameters

IRequest $httpRequest

Return Value

Request|null

at line 283
string|null constructUrl(Request $appRequest, Url $refUrl)

Constructs absolute URL from Request object.

Parameters

Request $appRequest
Url $refUrl

Return Value

string|null

at line 633
string getMask()

Returns mask.

Return Value

string

at line 643
array getDefaults()

Returns default values.

Return Value

array

at line 659
int getFlags()

Returns flags.

Return Value

int

at line 673
string[]|null getTargetPresenters()

internal  
 

Proprietary cache aim.

Return Value

string[]|null

at line 731
static string action2path($s)

camelCaseAction name -> dash-separated.

Parameters

$s

Return Value

string

at line 745
static string path2action($s)

dash-separated -> camelCaseAction name.

Parameters

$s

Return Value

string

at line 759
static string presenter2path($s)

PascalCase:Presenter name -> dash-and-dot-separated.

Parameters

$s

Return Value

string

at line 774
static string path2presenter($s)

dash-and-dot-separated -> PascalCase:Presenter name.

Parameters

$s

Return Value

string

at line 789
static string param2path($s)

Url encode.

Parameters

$s

Return Value

string

Traits

SmartObject