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

Zend_Controller_Dispatcher_Abstract
   |
   --Zend_Controller_Dispatcher_Standard
Variable Summary
 string $_curModule
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
Methods
addControllerDirectory (line 65)

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

Convert a class name to a filename

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

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

Format the module name.

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

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

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

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

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

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

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

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

Determine if a given module is valid

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

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

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 Fri, 06 Apr 2007 18:31:54 -0700 by phpDocumentor 1.3.1