MvcTools: ezcMvcController
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMvcController
|
Interface defining controller classes. [
source]
Controllers process the client's request and returns variables usable by the view-manager in an instance of an ezcMvcResult. Controllers should not access request variables directly but should use the passed ezcMvcRequest. The process is done through the createResult() method, but is not limited to use protected nor private methods. The result of running a controller is an instance of ezcMvcResult.
Member Variables
Method Summary
|
public ezcMvcController |
__construct(
$action, $request )
Creates a new controller object and sets all the request variables as class variables. |
|
public static string |
createActionMethodName(
$action )
Creates a method name to call from an $action name. |
|
public ezcMvcResult|ezcMvcInternalRedirect |
createResult(
)
Runs the controller to process the query and return variables usable to render the view. |
|
public ezcMvcRouter |
getRouter(
)
Returns the router associated with this request. |
|
protected void |
setRequestVariables(
$request )
Loops over all the variables in the request, and sets them as object properties. |
|
public void |
setRouter(
$router )
Sets the router associated with this request. |
Methods
__construct
ezcMvcController __construct(
string
$action,
ezcMvcRequest
$request )
Creates a new controller object and sets all the request variables as class variables.
Parameters
Throws
| Class | Description |
ezcMvcControllerException |
if the action method is empty |
createActionMethodName
string createActionMethodName(
string
$action )
Creates a method name to call from an $action name.
Parameters
| Name |
Type |
Description |
$action |
string |
|
createResult
Runs the controller to process the query and return variables usable to render the view.
Throws
| Class | Description |
ezcMvcActionNotFoundException |
if the action method could not be found |
getRouter
Returns the router associated with this request.
setRequestVariables
Loops over all the variables in the request, and sets them as object properties.
Parameters
setRouter
Sets the router associated with this request.
Parameters
Last updated: Tue, 01 Sep 2009