Abstract Class Zend_Controller_Action

Description

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


	
			
Variable Summary
Method Summary
 Zend_Controller_Action __construct ()
 void indexAction ()
 void run (Zend_Controller_Dispatcher_Interface $dispatcher, Zend_Controller_Dispatcher_Token $action)
 void _forward (string $controllerName, string $actionName, [array $params = array()])
 array _getAllParams ()
 boolean _getParam (string $paramName, [string $default = null])
 void _redirect (string $url)
 void __call (string $methodName, array $args)
Variables
Zend_Controller_Dispatcher_Token $_action = null (line 36)

Zend_Controller_Dispatcher_Token object wrapping this controller/action call.

  • access: protected
Zend_Controller_Dispatcher_Token $_nextAction = null (line 49)

Zend_Controller_Dispatcher_Token object wrapping the controller/action for the next call. This is set by Zend_Controller_Action::_forward().

  • access: private
array $_params = null (line 42)

Parameters, copied from Zend_Controller_Dispatcher_Token object

  • access: private
Methods
Constructor __construct (line 70)

Class constructor

  • access: public
Zend_Controller_Action __construct ()
indexAction (line 64)

Any controller extending Zend_Controller_Action must provide an index() method. The index() method is the default action for the controller when no action is specified.

This only handles a controller which has been called with no action specified in the URI.

For handling nonexistant actions in controllers (bad action part of URI), the controller class must provide a __call() method or an exception will be thrown.

  • access: public
  • abstract:
void indexAction ()
run (line 99)

Initialize the class instance variables and then call the action.

  • access: public
void run (Zend_Controller_Dispatcher_Interface $dispatcher, Zend_Controller_Dispatcher_Token $action)
_forward (line 176)

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 Zend_Controller_Dispatcher_Token item is received.

  • access: protected
void _forward (string $controllerName, string $actionName, [array $params = array()])
  • string $controllerName
  • string $actionName
  • array $params
_getAllParams (line 159)

Return all parameters that were passed to the controller as an associative array.

  • access: protected
array _getAllParams ()
_getParam (line 139)

Gets a parameter that was passed to this controller. If the parameter does not exist, FALSE will be return.

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

  • access: protected
boolean _getParam (string $paramName, [string $default = null])
  • string $paramName
  • string $default
_redirect (line 187)

Redirect to another URL

  • access: protected
void _redirect (string $url)
  • string $url
__call (line 82)

Proxy for undefined methods. Default behavior is to throw an exception on undefined methods, however this function can be overrided to implement magic (dynamic) actions.

  • access: public
void __call (string $methodName, array $args)
  • string $methodName
  • array $args

Documentation generated on Tue, 18 Apr 2006 11:54:37 -0700 by phpDocumentor 1.3.0RC3