Class Zend_Controller_Dispatcher_Standard

Description
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Controller/Dispatcher/Standard.php (line 44)

Zend_Controller_Dispatcher_Abstract
   |
   --Zend_Controller_Dispatcher_Standard
Variable Summary
 string $_curModule
Method Summary
 void __construct ([ $params = array()])
 Zend_Controller_Dispatcher_Standard addControllerDirectory (string $path, [string $module = null])
 string classToFilename (string $class)
 string formatModuleName (string $unformatted)
 array|string getControllerDirectory ([string $module = null])
 bool isValidModule (string $module)
 string loadClass (string $className)
Variables
Methods
Constructor __construct (line 64)

Constructor: Set current module to default value

  • access: public
void __construct ([ $params = array()])
  • array $params

Redefinition of:
Zend_Controller_Dispatcher_Abstract::__construct()
Constructor
addControllerDirectory (line 77)

Add a single path to the controller directory stack

  • access: public
Zend_Controller_Dispatcher_Standard addControllerDirectory (string $path, [string $module = null])
  • string $path
  • string $module
classToFilename (line 137)

Convert a class name to a filename

  • access: public
string classToFilename (string $class)
  • string $class
dispatch (line 179)

Dispatch to a controller/action

By default, if a controller is not dispatchable, dispatch() will throw an exception. If you wish to use the default controller instead, set the param 'useDefaultControllerAlways' via setParam().

  • throws: Zend_Controller_Dispatcher_Exception
  • access: public
boolean dispatch (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response)
formatModuleName (line 126)

Format the module name.

  • access: public
string formatModuleName (string $unformatted)
  • string $unformatted
getActionMethod (line 377)

Determine the action name

First attempt to retrieve from request; then from request params using action key; default to default action

Returns formatted action name

  • access: public
string getActionMethod (Zend_Controller_Request_Abstract $request)
getControllerClass (line 286)

Get controller class name

Try request first; if not found, try pulling from request parameter; if still not found, fallback to default

  • return: Returns class name on success
  • access: public
string|false getControllerClass (Zend_Controller_Request_Abstract $request)
getControllerDirectory (line 109)

Return the currently set directories for Zend_Controller_Action class lookup

If a module is specified, returns just that directory.

  • return: Returns array of all directories by default, single module directory if module argument provided
  • access: public
array|string getControllerDirectory ([string $module = null])
  • string $module: Module name
getDefaultControllerClass (line 332)

Retrieve default controller class

Determines whether the default controller to use lies within the requested module, or if the global default should be used.

By default, will only use the module default unless that controller does not exist; if this is the case, it falls back to the default controller in the default module.

  • access: public
string getDefaultControllerClass (Zend_Controller_Request_Abstract $request)
getDispatchDirectory (line 361)

Return the value of the currently selected dispatch directory (as set by getController())

  • access: public
string getDispatchDirectory ()
isDispatchable (line 154)

Returns TRUE if the Zend_Controller_Request_Abstract object can be dispatched to a controller.

Use this method wisely. By default, the dispatcher will fall back to the default controller (either in the module specified or the global default) if a given controller does not exist. This method returning false does not necessarily indicate the dispatcher will not still dispatch the call.

  • access: public
boolean isDispatchable (Zend_Controller_Request_Abstract $request, Zend_Controller_Request_Abstract $action)
isValidModule (line 313)

Determine if a given module is valid

  • access: public
bool isValidModule (string $module)
  • string $module
loadClass (line 251)

Load a controller class

Attempts to load the controller class file from getControllerDirectory(). If the controller belongs to a module, looks for the module prefix to the controller class.

  • return: Class name loaded
  • throws: Zend_Controller_Dispatcher_Exception if class not loaded
  • access: public
string loadClass (string $className)
  • string $className
setControllerDirectory (line 93)

Set controller directory

  • access: public
Zend_Controller_Dispatcher_Standard setControllerDirectory (array|string $directory)
  • array|string $directory

Inherited Methods

Inherited From Zend_Controller_Dispatcher_Abstract

 Zend_Controller_Dispatcher_Abstract::__construct()
 Zend_Controller_Dispatcher_Abstract::clearParams()
 Zend_Controller_Dispatcher_Abstract::formatActionName()
 Zend_Controller_Dispatcher_Abstract::formatControllerName()
 Zend_Controller_Dispatcher_Abstract::getDefaultAction()
 Zend_Controller_Dispatcher_Abstract::getDefaultControllerName()
 Zend_Controller_Dispatcher_Abstract::getDefaultModule()
 Zend_Controller_Dispatcher_Abstract::getFrontController()
 Zend_Controller_Dispatcher_Abstract::getParam()
 Zend_Controller_Dispatcher_Abstract::getParams()
 Zend_Controller_Dispatcher_Abstract::getPathDelimiter()
 Zend_Controller_Dispatcher_Abstract::getResponse()
 Zend_Controller_Dispatcher_Abstract::getWordDelimiter()
 Zend_Controller_Dispatcher_Abstract::setDefaultAction()
 Zend_Controller_Dispatcher_Abstract::setDefaultControllerName()
 Zend_Controller_Dispatcher_Abstract::setDefaultModule()
 Zend_Controller_Dispatcher_Abstract::setFrontController()
 Zend_Controller_Dispatcher_Abstract::setParam()
 Zend_Controller_Dispatcher_Abstract::setParams()
 Zend_Controller_Dispatcher_Abstract::setPathDelimiter()
 Zend_Controller_Dispatcher_Abstract::setResponse()
 Zend_Controller_Dispatcher_Abstract::setWordDelimiter()
 Zend_Controller_Dispatcher_Abstract::_formatName()
 Zend_Controller_Dispatcher_Abstract::_verifyDelimiter()

Documentation generated on Sun, 27 May 2007 23:27:47 -0700 by phpDocumentor 1.3.2