Methods summary
public
array
&
|
#
Matches( MvcCore\IRequest $request )
Parameters
- $request
- The request object instance.
Returns
array Matched and params array, keys are matched
params or controller and action params.
Throws
LogicException Route configuration property is missing.
InvalidArgumentException Wrong route pattern format.
Inheritdocs
|
protected
string
|
#
matchesGetPattern( )
Return pattern value used for preg_match_all() route match processing.
Check if match property has any value and if it has, process internal
route initialization only on reverse (or pattern ) property, because
match regular expression is probably prepared and initialized manually.
If there is no value in match property (NULL ), process internal
initialization on pattern property (or on reverse if exists) and
complete regular expression into match property and metadata about
reverse property to build URL address any time later on this route.
Return pattern value used for preg_match_all() route match processing.
Check if match property has any value and if it has, process internal
route initialization only on reverse (or pattern ) property, because
match regular expression is probably prepared and initialized manually.
If there is no value in match property (NULL ), process internal
initialization on pattern property (or on reverse if exists) and
complete regular expression into match property and metadata about
reverse property to build URL address any time later on this route.
Returns
string
Throws
LogicException Route configuration property is missing.
InvalidArgumentException Wrong route pattern format.
|
protected
string
|
#
matchesGetSubject( MvcCore\IRequest $request )
Return subject value used for preg_match_all() route match processing.
Complete subject by route flags. If route pattern (or reverse ) contains
domain part or base path, prepare those values from request object. Than
prepare always request path and if route pattern (or reverse ) contains
any query string part, append into result subject query string from request
object.
Return subject value used for preg_match_all() route match processing.
Complete subject by route flags. If route pattern (or reverse ) contains
domain part or base path, prepare those values from request object. Than
prepare always request path and if route pattern (or reverse ) contains
any query string part, append into result subject query string from request
object.
Parameters
Returns
string
|
protected
array
&
|
#
match( string $pattern, string & $subject )
Process preg_match_all() by given $pattern on given $subject .
If subject contains higher characters than ASCII, add unicode modifier
after pattern if necessary.
Process preg_match_all() by given $pattern on given $subject .
If subject contains higher characters than ASCII, add unicode modifier
after pattern if necessary.
Parameters
Returns
array
|
protected
string
|
#
matchesGetSubjectHostAndBase( MvcCore\IRequest $request )
Return subject value scheme, domain and base path part, used for
preg_match_all() route match processing. Check which scheme route
pattern (or reverse ) contains and prepare scheme string. Than check
if route pattern (or reverse ) contains domain part with any domain
placeholders and prepare domain part with the placeholders. Then also in
the same way prepare base path part if necessary, there is also base path
placeholder possibility.
Return subject value scheme, domain and base path part, used for
preg_match_all() route match processing. Check which scheme route
pattern (or reverse ) contains and prepare scheme string. Than check
if route pattern (or reverse ) contains domain part with any domain
placeholders and prepare domain part with the placeholders. Then also in
the same way prepare base path part if necessary, there is also base path
placeholder possibility.
Parameters
Returns
string
|
protected
string
|
#
matchesGetSubjectScheme( integer & $schemeFlag )
Return subject value - the scheme part, used for preg_match_all() route
match processing. Given flag value contains scheme part string length,
which is an array index inside local static property to return real scheme
string by the flag.
Return subject value - the scheme part, used for preg_match_all() route
match processing. Given flag value contains scheme part string length,
which is an array index inside local static property to return real scheme
string by the flag.
Parameters
Returns
string
|
protected
string
|
#
matchesGetSubjectHost( MvcCore\IRequest $request, integer & $hostFlag )
Return subject value - the domain part, used for preg_match_all() route
match processing. Given flag value contains integer about which placeholder
strings the route pattern (or reverse ) contains. Result is only the
domain part with requested domain parts or placeholders to match pattern
and subject in match processing.
Return subject value - the domain part, used for preg_match_all() route
match processing. Given flag value contains integer about which placeholder
strings the route pattern (or reverse ) contains. Result is only the
domain part with requested domain parts or placeholders to match pattern
and subject in match processing.
Parameters
Returns
string
|
protected
array
&
|
#
matchesParseRewriteParams( array & $matchedValues, array & $defaults )
Parse rewrite params from preg_match_all() $matches result array into
array, keyed by param name with parsed value. If route has defined any
controller or action property, those values are defined into result
array first, converted into dashed case. If any rewrite param defines
controller or action again, those values are overwritten in result
array by values from regular expression $matches array.
Parse rewrite params from preg_match_all() $matches result array into
array, keyed by param name with parsed value. If route has defined any
controller or action property, those values are defined into result
array first, converted into dashed case. If any rewrite param defines
controller or action again, those values are overwritten in result
array by values from regular expression $matches array.
Parameters
Returns
array
|