Docs For Class Zend_Controller_Action

## Class Zend_Controller_Action

Description

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Controller/Action.php (line 38)

Variable Summary
array $_invokeArgs
Zend_Controller_Request_Abstract $_request
Zend_Controller_Response_Abstract $_response
Method Summary
void __construct (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response)
array getInvokeArgs ()
Zend_Controller_Request_Abstract getRequest ()
Zend_Controller_Response_Abstract getResponse ()
void init ()
void postDispatch ()
void preDispatch ()
Zend_Controller_Response_Abstract run ([Zend_Controller_Request_Abstract $request = null], [Zend_Controller_Response_Abstract $response = null])
self setRequest (Zend_Controller_Request_Abstract $request)
self setResponse (Zend_Controller_Response_Abstract $response)
void _forward (string $controllerName, string $actionName, [array $params = array()])
array _getAllParams ()
boolean _getParam (string $paramName, [mixed $default = null])
void _redirect (string $url)
void __call (string $methodName, array $args)
Variables
array $_invokeArgs = array() (line 57)

Array of arguments provided to the constructor, minus the $_request.

- access: protected

Zend_Controller_Request_Abstract $_request = null (line 44)

Zend_Controller_Request_Abstract object wrapping the request environment

- access: protected

Zend_Controller_Response_Abstract $_response = null (line 50)

Zend_Controller_Response_Abstract object wrapping the response

- access: protected

Methods
Constructor __construct (line 71)

Class constructor

Marked final to ensure that the request object is provided to the constructor. However, additional construction actions can be invoked in init(), and all additional arguments passed to the constructor will be passed as arguments to init().

- access: public

void __construct (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response)

- Zend_Controller_Request_Abstract $request
- Zend_Controller_Response_Abstract $response

getInvokeArgs (line 152)

Return the array of constructor arguments (minus the Request object)

- access: public

array getInvokeArgs ()
getRequest (line 108)

Return the Request object

- access: public

Zend_Controller_Request_Abstract getRequest ()
getResponse (line 130)

Return the Response object

- access: public

Zend_Controller_Response_Abstract getResponse ()
init (line 99)

Initialize object

Called from __construct() with all arguments passed to the constructor, minus the request object. Use for custom object initialization.

- access: public

void init ()
postDispatch (line 184)

Post-dispatch routines

Called after action method execution. If using class with Zend_Controller_Front, it may modify the Request object and reset its dispatched flag in order to process an additional action.

Common usages for postDispatch() include rendering content in a sitewide template, link url correction, setting headers, etc.

- access: public

void postDispatch ()
preDispatch (line 167)

Pre-dispatch routines

Called before action method. If using class with Zend_Controller_Front, it may modify the Request object and reset its dispatched flag in order to skip processing the current action.

- access: public

void preDispatch ()
run (line 229)

Call the action specified in the request object, and return a response

Not used in the Action Controller implementation, but left for usage in Page Controller implementations. Dispatches a method based on the request.

Returns a Zend_Controller_Response_Abstract object, instantiating one prior to execution if none exists in the controller.

preDispatch() is called prior to the action, postDispatch() is called following it.

- access: public

Zend_Controller_Response_Abstract run ([Zend_Controller_Request_Abstract $request = null], [Zend_Controller_Response_Abstract $response = null])

- null|Zend_Controller_Request_Abstract $request: Optional request object to use
- null|Zend_Controller_Response_Abstract $response: Optional response object to use

setRequest (line 119)

Set the Request object

- access: public

self setRequest (Zend_Controller_Request_Abstract $request)

- Zend_Controller_Request_Abstract $request

setResponse (line 141)

Set the Response object

- access: public

self setResponse (Zend_Controller_Response_Abstract $response)

- Zend_Controller_Response_Abstract $response

_forward (line 300)

Forward to another controller/action.

It is important to supply the unformatted names, i.e. "article" rather than "ArticleController". The dispatcher will do the appropriate formatting when the request is received.

- access: protected

void _forward (string $controllerName, string $actionName, [array $params = array()])

- string $controllerName
- string $actionName
- array $params

_getAllParams (line 282)

Return all parameters in the $_request as an associative array.

- access: protected

array _getAllParams ()
_getParam (line 265)

Gets a parameter from the $_request. If the parameter does not exist, NULL will be return.

If the parameter does not exist and $default is set, then $default will be returned instead of NULL.

- access: protected

boolean _getParam (string $paramName, [mixed $default = null])

- string $paramName
- mixed $default

_redirect (line 314)

Redirect to another URL

- access: protected

void _redirect (string $url)

- string $url

__call (line 197)

Proxy for undefined methods. Default behavior is to throw an exception on undefined methods, however this function can be overridden to implement magic (dynamic) actions, or provide run-time dispatching.

- access: public

void __call (string $methodName, array $args)

- string $methodName
- array $args

Documentation generated on Sun, 29 Oct 2006 21:27:50 -0600 by phpDocumentor 1.3.0RC6