category | Zend |
---|---|
package | Zend_Controller |
subpackage | Dispatcher |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Controller_Dispatcher_Abstract |
__construct(array $params = array()
) : void
inherited_from | \Zend_Controller_Dispatcher_Abstract::__construct() |
---|
array
__construct(array $params = array()
) : void
_verifyDelimiter(string|array $spec) : array
Verify a delimiter to use in controllers or actions. May be a single string or an array of strings.
string
array
\Zend_Controller_Dispatcher_Exception |
with invalid delimiters |
---|
array
addControllerDirectory(string $path, string $module = null
) : \Zend_Controller_Dispatcher_Standard
string
string
\Zend_Controller_Dispatcher_Standard
classToFilename(string $class) : string
string
string
clearParams($name = null
) : \Zend_Controller_Dispatcher_Abstract
By default, clears all parameters. If a parameter name is given, clears only that parameter; if an array of parameter names is provided, clears each.
inherited_from | \Zend_Controller_Dispatcher_Interface::clearParams() |
---|
\Zend_Controller_Dispatcher_Abstract
dispatch(\Zend_Controller_Request_Abstract $request, \Zend_Controller_Response_Abstract $response) : void
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().
\Zend_Controller_Request_Abstract
\Zend_Controller_Response_Abstract
\Zend_Controller_Dispatcher_Exception |
---|
formatActionName(string $unformatted) : string
inherited_from | \Zend_Controller_Dispatcher_Interface::formatActionName() |
---|
string
string
formatClassName(string $moduleName, string $className) : string
string
Name of the current module
string
Name of the action class
string
Formatted class nameformatControllerName(string $unformatted) : string
inherited_from | \Zend_Controller_Dispatcher_Interface::formatControllerName() |
---|
string
string
formatModuleName(string $unformatted) : string
string
string
getActionMethod(\Zend_Controller_Request_Abstract $request) : string
First attempt to retrieve from request; then from request params using action key; default to default action
Returns formatted action name
\Zend_Controller_Request_Abstract
string
getControllerClass(\Zend_Controller_Request_Abstract $request) : string | false
Try request first; if not found, try pulling from request parameter; if still not found, fallback to default
\Zend_Controller_Request_Abstract
string
false
Returns class name on successgetControllerDirectory(string $module = null
) : array | string
If a module is specified, returns just that directory.
string
Module name
array
string
Returns array of all directories by default, single
module directory if module argument providedgetDefaultAction() : string
inherited_from | \Zend_Controller_Dispatcher_Interface::getDefaultAction() |
---|
string
getDefaultControllerClass(\Zend_Controller_Request_Abstract $request) : string
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.
\Zend_Controller_Request_Abstract
string
getDefaultControllerName() : string
inherited_from | \Zend_Controller_Dispatcher_Interface::getDefaultControllerName() |
---|
string
getDefaultModule() : string
inherited_from | \Zend_Controller_Dispatcher_Interface::getDefaultModule() |
---|
string
getDispatchDirectory() : string
string
getFrontController() : \Zend_Controller_Front
\Zend_Controller_Front
getParam(string $name) : mixed
inherited_from | \Zend_Controller_Dispatcher_Interface::getParam() |
---|
string
mixed
getParams() : array
inherited_from | \Zend_Controller_Dispatcher_Interface::getParams() |
---|
array
getPathDelimiter() : array
array
getResponse() : \Zend_Controller_Response_Abstract | null
inherited_from | \Zend_Controller_Dispatcher_Interface::getResponse() |
---|
\Zend_Controller_Response_Abstract
null
getWordDelimiter() : array
array
isDispatchable(\Zend_Controller_Request_Abstract $request) : boolean
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.
boolean
isValidModule(string $module) : boolean
string
boolean
loadClass(string $className) : string
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.
string
\Zend_Controller_Dispatcher_Exception |
if class not loaded |
---|
string
Class name loadedremoveControllerDirectory(string $module) : boolean
string
boolean
setControllerDirectory(array|string $directory, $module = null
) : \Zend_Controller_Dispatcher_Standard
array
string
\Zend_Controller_Dispatcher_Standard
setDefaultAction(string $action) : \Zend_Controller_Dispatcher_Abstract
string
\Zend_Controller_Dispatcher_Abstract
setDefaultControllerName(string $controller) : \Zend_Controller_Dispatcher_Abstract
string
\Zend_Controller_Dispatcher_Abstract
setDefaultModule(string $module) : \Zend_Controller_Dispatcher_Abstract
string
\Zend_Controller_Dispatcher_Abstract
setFrontController(\Zend_Controller_Front $controller) : \Zend_Controller_Dispatcher_Abstract
\Zend_Controller_Front
\Zend_Controller_Dispatcher_Abstract
setParam(string $name, mixed $value) : \Zend_Controller_Dispatcher_Abstract
inherited_from | \Zend_Controller_Dispatcher_Interface::setParam() |
---|
string
mixed
\Zend_Controller_Dispatcher_Abstract
setParams(array $params) : \Zend_Controller_Dispatcher_Abstract
inherited_from | \Zend_Controller_Dispatcher_Interface::setParams() |
---|
array
\Zend_Controller_Dispatcher_Abstract
setPathDelimiter(string $spec) : \Zend_Controller_Dispatcher_Abstract
Set the path delimiter to use in controllers. May be a single string or an array of strings.
string
\Zend_Controller_Dispatcher_Abstract
setResponse(\Zend_Controller_Response_Abstract|null $response = null
) : \Zend_Controller_Dispatcher_Abstract
inherited_from | \Zend_Controller_Dispatcher_Interface::setResponse() |
---|
\Zend_Controller_Response_Abstract
null
\Zend_Controller_Dispatcher_Abstract
setWordDelimiter(string|array $spec) : \Zend_Controller_Dispatcher_Abstract
Set the word delimiter to use in controllers and actions. May be a single string or an array of strings.
string
array
\Zend_Controller_Dispatcher_Abstract
_formatName(string $unformatted, boolean $isAction = false
) : string
By default, replaces words separated by the word separator character(s) with camelCaps. If $isAction is false, it also preserves replaces words separated by the path separation character with an underscore, making the following word Title cased. All non-alphanumeric characters are removed.
string
boolean
Defaults to false
string
$_controllerDirectory : array
array()
$_curDirectory : string
$_curModule : string
$_defaultAction : string
'index'
$_defaultController : string
'index'
$_defaultModule : string
'default'
$_frontController : \Zend_Controller_Front
$_invokeParams : array
array()
$_pathDelimiter : string
'_'
$_response : \Zend_Controller_Response_Abstract | null
null
$_wordDelimiter : array
array('-', '.')