Methods summary
public
string|array|null
|
#
GetPattern( string|null $localization = NULL )
Get route base pattern to complete match pattern string to match requested
URL and to complete reverse pattern string to build back an URL address.
Get route base pattern to complete match pattern string to match requested
URL and to complete reverse pattern string to build back an URL address.
If any localization is specified and if there is configured any pattern
under given localization, localized pattern string is returned, else
standard route pattern value is returned.
Parameters
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
string|array|null
|
public
MvcCore\Ext\Routers\Localizations\Route
|
#
SetPattern( string|array $pattern, string|null $localization = NULL )
Set route base pattern to complete match pattern string to match requested
URL and to complete reverse pattern string to build back an URL address.
Set route base pattern to complete match pattern string to match requested
URL and to complete reverse pattern string to build back an URL address.
If any localization is specified, pattern string will be stored under
localization key, else pattern string will be stored for all localizations.
If given pattern value is array, it must be associative array with keys
as localizations and values as pattern strings. Then any second argument
is not necessary to specify.
Parameters
- $pattern
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
|
public
string|array|null
|
#
GetMatch( string|null $localization = NULL )
Get route match pattern in raw form (to use it as it is) to match requested
URL. This match pattern must have the very same structure and content
as reverse pattern, because there is necessary to complete route flags
from reverse pattern string - to prepare proper regular expression
subject for this match , not just only the request path . Because those
flags is not possible to detect from raw regular expression string.
Get route match pattern in raw form (to use it as it is) to match requested
URL. This match pattern must have the very same structure and content
as reverse pattern, because there is necessary to complete route flags
from reverse pattern string - to prepare proper regular expression
subject for this match , not just only the request path . Because those
flags is not possible to detect from raw regular expression string.
If any localization is specified and if there is configured any match
under given localization, localized match string is returned, else
standard route match value is returned.
Parameters
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
string|array|null
|
public
MvcCore\Ext\Routers\Localizations\Route
|
#
SetMatch( string|array $match, string|null $localization = NULL )
Set route match pattern in raw form (to use it as it is) to match requested
URL. This match pattern must have the very same structure and content
as reverse pattern, because there is necessary to complete route flags
from reverse pattern string - to prepare proper regular expression
subject for this match , not just only the request path . Because those
flags is not possible to detect from raw regular expression string.
Set route match pattern in raw form (to use it as it is) to match requested
URL. This match pattern must have the very same structure and content
as reverse pattern, because there is necessary to complete route flags
from reverse pattern string - to prepare proper regular expression
subject for this match , not just only the request path . Because those
flags is not possible to detect from raw regular expression string.
If any localization is specified, match string will be stored under
localization key, else match string will be stored for all localizations.
If given match value is array, it must be associative array with keys
as localizations and values as match strings. Then any second argument
is not necessary to specify.
Parameters
- $match
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
|
public
string|array|null
|
#
GetReverse( string|null $localization = NULL )
Get route reverse address replacements pattern to build url.
- No regular expression border # characters.
- No regular expression characters escaping ([](){}<>|=+*.!?-/ ).
- No start ^ or end $ regular expression characters.
Get route reverse address replacements pattern to build url.
- No regular expression border # characters.
- No regular expression characters escaping ([](){}<>|=+*.!?-/ ).
- No start ^ or end $ regular expression characters.
If any localization is specified and if there is configured any reverse
under given localization, localized reverse string is returned, else
standard route reverse value is returned.
Parameters
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
string|array|null
|
public
MvcCore\Ext\Routers\Localizations\Route
|
#
SetReverse( string|array $reverse, string|null $localization = NULL )
Set route reverse address replacements pattern to build url.
- No regular expression border # characters.
- No regular expression characters escaping ([](){}<>|=+*.!?-/ ).
- No start ^ or end $ regular expression characters.
Set route reverse address replacements pattern to build url.
- No regular expression border # characters.
- No regular expression characters escaping ([](){}<>|=+*.!?-/ ).
- No start ^ or end $ regular expression characters.
If any localization is specified, reverse string will be stored under
localization key, else reverse string will be stored for all localizations.
If given reverse value is array, it must be associative array with keys
as localizations and values as reverse strings. Then any second argument
is not necessary to specify.
Parameters
- $reverse
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
|
public
array|array[]
&
|
#
GetDefaults( string|null $localization = NULL )
Get route rewrite params default values and also any other query string
params default values. It could be used for any application request
param from those application inputs - $_GET , $_POST or php://input .
Get route rewrite params default values and also any other query string
params default values. It could be used for any application request
param from those application inputs - $_GET , $_POST or php://input .
If any localization is specified and if there is configured any default
param values as array under given localization, localized default param
values are returned, else standard route default param values are returned.
Parameters
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
array|array[]
|
public
MvcCore\Ext\Routers\Localizations\Route
|
#
SetDefaults( array|array[] $defaults = [], string|null $localization = NULL )
Set route rewrite params default values and also any other query string
params default values. It could be used for any application request
param from those application inputs - $_GET , $_POST or php://input .
Set route rewrite params default values and also any other query string
params default values. It could be used for any application request
param from those application inputs - $_GET , $_POST or php://input .
If any localization is specified, default param values will be stored under
localization key, else default param values will be stored for all
localizations. If given default param values is an associative array with
only localization keys, it must be associative array with values as
associative arrays with localized params default values. Then any second
argument is not necessary to specify.
Parameters
- $defaults
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
|
public
array|array[]
&
|
#
GetConstraints( string|null $localization = NULL )
Get array with param names and their custom regular expression matching
rules. Not required, for all rewrite params there is used default
matching rules from route static properties defaultDomainConstraint or
defaultPathConstraint . It should be changed to any value. Default value
is "[^.]+" for domain part and "[^/]+" for path part.
Get array with param names and their custom regular expression matching
rules. Not required, for all rewrite params there is used default
matching rules from route static properties defaultDomainConstraint or
defaultPathConstraint . It should be changed to any value. Default value
is "[^.]+" for domain part and "[^/]+" for path part.
If any localization is specified and if there is configured any
constraints values as array under given localization, localized
constraints are returned, else standard route constraints are returned.
Parameters
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
array|array[]
|
public
MvcCore\Ext\Routers\Localizations\Route
|
#
SetConstraints( array|array[] $constraints = [], string|null $localization = NULL )
Set array with param names and their custom regular expression matching
rules. Not required, for all rewrite params there is used default
matching rules from route static properties defaultDomainConstraint or
defaultPathConstraint . It should be changed to any value. Default value
is "[^.]+" for domain part and "[^/]+" for path part.
Set array with param names and their custom regular expression matching
rules. Not required, for all rewrite params there is used default
matching rules from route static properties defaultDomainConstraint or
defaultPathConstraint . It should be changed to any value. Default value
is "[^.]+" for domain part and "[^/]+" for path part.
If any localization is specified, constraints values will be stored under
localization key, else constraints values will be stored for all
localizations. If given constraints values is an associative array with
only localization keys, it must be associative array with values as
associative arrays with params constraints values. Then any second
argument is not necessary to specify.
Parameters
- $constraints
- $localization
Lower case language code, optionally
with dash and upper case locale code.
Returns
|
public
string[]|null
|
#
GetReverseParams( )
Return only reverse params names as string s array.
Example: ["name", "color"];
Return only reverse params names as string s array.
Example: ["name", "color"];
Returns
string[]|null
|
public
string|array|null
|
#
GetGroupName( )
Get route group name(s) to belongs to. Group name is always first word
parsed from request path. First word is content between two first slashes
in request path. If group name is NULL , route belongs to default group
and that group is used when no other group matching the request path.
This method could return associative array with localization keys and
values as group names for specific localizations, if group name is not
the same for all localizations.
Get route group name(s) to belongs to. Group name is always first word
parsed from request path. First word is content between two first slashes
in request path. If group name is NULL , route belongs to default group
and that group is used when no other group matching the request path.
This method could return associative array with localization keys and
values as group names for specific localizations, if group name is not
the same for all localizations.
Returns
string|array|null
|
public
MvcCore\Route
|
#
SetGroupName( string|array|null $groupName )
Set route group name(s) to belongs to. Group name is always first word
parsed from request path. First word is content between two first slashes
in request path. If group name is NULL , route belongs to default group
and that group is used when no other group matching the request path.
This method accepts with argument to be a string for group name in the
same for all localizations or an associative array with localization keys
and values as localization specific group names.
Set route group name(s) to belongs to. Group name is always first word
parsed from request path. First word is content between two first slashes
in request path. If group name is NULL , route belongs to default group
and that group is used when no other group matching the request path.
This method accepts with argument to be a string for group name in the
same for all localizations or an associative array with localization keys
and values as localization specific group names.
Parameters
Returns
|
Properties summary
protected
array
|
$patternLocalized
Standard route pattern string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
Standard route pattern string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
|
|
protected
array
|
$matchLocalized
Standard route match string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
Standard route match string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
|
|
protected
array
|
$reverseLocalized
Standard route reverse string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
Standard route reverse string(s), but for multiple localizations. Keys could
be lower case languages or lower case languages + dash + upper-case locales.
|
|
protected
array
|
$defaultsLocalized
Standard route default params values, but for multiple localizations. Keys
could be lower case languages or lower case languages + dash + upper-case
locales. Values are normal associative arrays with keys as param names and
values as default param values.
Standard route default params values, but for multiple localizations. Keys
could be lower case languages or lower case languages + dash + upper-case
locales. Values are normal associative arrays with keys as param names and
values as default param values.
|
|
protected
array
|
$constraintsLocalized
Standard route constraint params values, but for multiple localizations. Keys
could be lower case languages or lower case languages + dash + upper-case
locales. Values are normal associative arrays with keys as param names and
values as regular expression constraints and limitations for specific param.
Standard route constraint params values, but for multiple localizations. Keys
could be lower case languages or lower case languages + dash + upper-case
locales. Values are normal associative arrays with keys as param names and
values as regular expression constraints and limitations for specific param.
|
|
protected
array
|
$reverseParamsLocalized
Standard route metadata array about all rewrite params, but for multiple
localizations. Keys could be lower case languages or lower case languages
+ dash + upper-case locales. Values are associative arrays with \stdClass
objects as items with metadata about all rewrite params in localization
specific pattern (or reverse ) property.
Standard route metadata array about all rewrite params, but for multiple
localizations. Keys could be lower case languages or lower case languages
+ dash + upper-case locales. Values are associative arrays with \stdClass
objects as items with metadata about all rewrite params in localization
specific pattern (or reverse ) property.
|
|
protected
array
|
$reverseSectionsLocalized
Standard route metadata array about all fixed or variable sections, but
for multiple localizations. Keys could be lower case languages or lower
case languages + dash + upper-case locales. Values are number indexed
arrays with \stdClass objects as items with metadata about all fixed or
variable sections in localization specific pattern (or reverse )
property.
Standard route metadata array about all fixed or variable sections, but
for multiple localizations. Keys could be lower case languages or lower
case languages + dash + upper-case locales. Values are number indexed
arrays with \stdClass objects as items with metadata about all fixed or
variable sections in localization specific pattern (or reverse )
property.
|
|