Class Zend_Controller_Dispatcher_Standard

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

Located in /Zend/Controller/Dispatcher/Standard.php (line 41)

Zend_Controller_Dispatcher_Abstract
   |
   --Zend_Controller_Dispatcher_Standard
Variable Summary
Method Summary
 Zend_Controller_Dispatcher_Standard addControllerDirectory (string $path, [string $module = 'default'])
 string classToFilename (string $class)
 string formatModuleName (string $unformatted)
 array|string getControllerDirectory ([string $module = null])
 bool isValidModule (string $module)
 string loadClass (string $className)
Variables
string $_curDirectory (line 47)

Current dispatchable directory

  • access: protected
string $_curModule = 'default' (line 53)

Current module (formatted)

  • access: protected
array $_directories = array() (line 59)

Directories where Zend_Controller_Action files are stored.

  • access: protected

Inherited Variables

Inherited from Zend_Controller_Dispatcher_Abstract

Zend_Controller_Dispatcher_Abstract::$_defaultAction
Zend_Controller_Dispatcher_Abstract::$_defaultController
Zend_Controller_Dispatcher_Abstract::$_frontController
Zend_Controller_Dispatcher_Abstract::$_invokeParams
Zend_Controller_Dispatcher_Abstract::$_pathDelimiter
Zend_Controller_Dispatcher_Abstract::$_response
Zend_Controller_Dispatcher_Abstract::$_wordDelimiter
Methods
addControllerDirectory (line 68)

Add a single path to the controller directory stack

  • access: public
Zend_Controller_Dispatcher_Standard addControllerDirectory (string $path, [string $module = 'default'])
  • string $path
  • string $module
classToFilename (line 124)

Convert a class name to a filename

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

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().

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

Format the module name.

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

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 258)

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 96)

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 304)

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 333)

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

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

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 285)

Determine if a given module is valid

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

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
  • access: public
  • throws: Zend_Controller_Dispatcher_Exception if class not loaded
string loadClass (string $className)
  • string $className
setControllerDirectory (line 80)

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::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::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 Wed, 21 Feb 2007 12:00:11 -0800 by phpDocumentor 1.3.1