Zeta Components Manual :: Docs For Class ezcMvcCatchAllRoute
MvcTools::ezcMvcCatchAllRoute
Class ezcMvcCatchAllRoute
Router class that acts like a catch all for /.../... type routes.
The routes are matched against the uri property of the request object.
Source for this file: /MvcTools/src/routes/catchall.php
Implements interfaces:
Version: | //autogentag// |
Member Variables
protected string |
$action
If url has no action to match, use this as default. |
protected string |
$controller
If url has no controller to match, use this as default. |
Method Summary
public ezcMvcCatchAllRoute |
__construct(
[ $defaultController
= 'index'] , [ $defaultAction
= 'index'] )
Construct a CatchAll Route |
protected boolean |
checkPrefixMatch(
$parts
)
Check if the prefix matches. |
protected string |
createControllerName(
)
Create the controller name from the matched name |
protected string |
createParamName(
$index
)
Create the param name from the indexed parameter |
protected string |
getUriString(
$request
)
Returns the request information that the matches() method will match the pattern against. |
public null|ezcMvcRoutingInformation |
matches(
$request
)
Returns routing information if the route matched, or null in case the route did not match. |
public void |
prefix(
$prefix
)
Adds a prefix to the route. |
Methods
__construct
ezcMvcCatchAllRoute
__construct(
[string
$defaultController
= 'index'] , [string
$defaultAction
= 'index'] )
Construct a CatchAll Route
Parameters:
Name | Type | Description |
---|---|---|
$defaultController |
string | |
$defaultAction |
string |
checkPrefixMatch
boolean
checkPrefixMatch(
array
$parts
)
Check if the prefix matches.
Parameters:
Name | Type | Description |
---|---|---|
$parts |
array |
createControllerName
string
createControllerName(
)
Create the controller name from the matched name
createParamName
string
createParamName(
int
$index
)
Create the param name from the indexed parameter
Parameters:
Name | Type | Description |
---|---|---|
$index |
int |
getUriString
string
getUriString(
ezcMvcRequest
$request
)
Returns the request information that the matches() method will match the pattern against.
Parameters:
Name | Type | Description |
---|---|---|
$request |
ezcMvcRequest |
matches
null|ezcMvcRoutingInformation
matches(
ezcMvcRequest
$request
)
Returns routing information if the route matched, or null in case the route did not match.
Parameters:
Name | Type | Description |
---|---|---|
$request |
ezcMvcRequest | Request to test. |
Implementation of:
Method | Description |
---|---|
ezcMvcRoute::matches() |
Returns routing information if the route matched, or null in case the route did not match. |
prefix
void
prefix(
string
$prefix
)
Adds a prefix to the route.
Parameters:
Name | Type | Description |
---|---|---|
$prefix |
string |
Implementation of:
Method | Description |
---|---|
ezcMvcRoute::prefix() |
Adds a prefix to the route. |
Documentation generated by phpDocumentor 1.4.3