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. |
|
protected void |
setRequestVariables(
$request )
Loops over all the variables in the request, and sets them as object properties. |
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 |
setRequestVariables
Loops over all the variables in the request, and sets them as object properties.
Parameters
Last updated: Mon, 11 May 2009