MvcTools: ezcMvcCatchAllRoute
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMvcCatchAllRoute
|
Router class that acts like a catch all for /.../... type routes. [
source]
Implemented Interfaces
The routes are matched against the uri property of the request object.
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
Returns the request information that the matches() method will match the pattern against.
Parameters
matches
Returns routing information if the route matched, or null in case the route did not match.
Parameters
prefix
void prefix(
string
$prefix )
Adds a prefix to the route.
Parameters
| Name |
Type |
Description |
$prefix |
string |
|
Last updated: Tue, 01 Sep 2009