Zend Framework  1.12
Public Member Functions | List of all members
Zend_Controller_Action_Interface Interface Reference

Public Member Functions

 __construct (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs=array())
 Class constructor.
 
 dispatch ($action)
 Dispatch the requested action.
 

Constructor & Destructor Documentation

__construct ( Zend_Controller_Request_Abstract  $request,
Zend_Controller_Response_Abstract  $response,
array  $invokeArgs = array() 
)

Class constructor.

The request and response objects should be registered with the controller, as should be any additional optional arguments; these will be available via getRequest(), getResponse(), and getInvokeArgs(), respectively.

When overriding the constructor, please consider this usage as a best practice and ensure that each is registered appropriately; the easiest way to do so is to simply call parent::__construct($request, $response, $invokeArgs).

After the request, response, and invokeArgs are set, the helper broker is initialized.

Finally, init() is called as the final action of instantiation, and may be safely overridden to perform initialization tasks; as a general rule, override init() instead of the constructor to customize an action controller's instantiation.

Parameters
Zend_Controller_Request_Abstract$request
Zend_Controller_Response_Abstract$response
array$invokeArgsAny additional invocation arguments
Returns
void

Implemented in Zend_Controller_Action.

Member Function Documentation

dispatch (   $action)

Dispatch the requested action.

Parameters
string$actionMethod name of action
Returns
void

Implemented in Zend_Controller_Action.