Maps an incoming HTTP request to actionable information (controller, method, method parameters, etc.) in the Front Controller pattern.
More...
Public Member Functions
Detailed Description
Maps an incoming HTTP request to actionable information (controller, method, method parameters, etc.) in the Front Controller pattern.
An instance of the incoming route is accessible via DMHTTPRequest::getCurrent()->getURI()->getRoute().
- Author:
- Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php
Definition at line 18 of file DMRoute.php.
Constructor & Destructor Documentation
| DMRoute::__construct |
( |
$ |
controller, |
|
|
$ |
method |
|
) |
| |
- Parameters:
-
| string | controller The controller that the action should instantiate |
| string | method The method that the action should invoke |
- Exceptions:
-
| DMInvalidRouteException | if the specified action's controller or method are invalid (the controller or method does not exist). |
Definition at line 54 of file DMRoute.php.
Member Function Documentation
| DMRoute::equals |
( |
$ |
object | ) |
|
- Parameters:
-
| object | object The object to compare |
- Returns:
- boolean
Definition at line 135 of file DMRoute.php.
| DMRoute::getAvailableRepresentations |
( |
| ) |
|
| DMRoute::getBestRepresentation |
( |
$ |
requested_representation = null | ) |
|
- Parameters:
-
| string | requested_representation Extension of requested representation (e.g. "xml" for XML, "json" for JSON, etc.) |
- Returns:
- string
Definition at line 84 of file DMRoute.php.
| DMRoute::getController |
( |
| ) |
|
| DMRoute::getParameters |
( |
| ) |
|
| DMRoute::isModuleRoute |
( |
| ) |
|
- Returns:
- boolean True if the route can be mapped to a controller method; false if not.
Definition at line 193 of file DMRoute.php.
| DMRoute::setAvailableRepresentations |
( |
array $ |
representations | ) |
|
- Parameters:
-
| array | representations Array of DMMediaTypes |
Definition at line 75 of file DMRoute.php.
| DMRoute::setController |
( |
$ |
name | ) |
|
| DMRoute::setMethod |
( |
$ |
method | ) |
|
| DMRoute::setModuleRoute |
( |
$ |
bool | ) |
|
| DMRoute::setParameters |
( |
$ |
params | ) |
|
- Parameters:
-
| params | Comma-delimited string |
Definition at line 185 of file DMRoute.php.
The documentation for this class was generated from the following file: