category Zend
package Zend_Controller
subpackage Dispatcher
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct(array $params = array()) : void

Parameters

$params

Verify delimiter

_verifyDelimiter(string|array $spec) : array

Verify a delimiter to use in controllers or actions. May be a single string or an array of strings.

Parameters

$spec

stringarray

Exceptions

\Zend_Controller_Dispatcher_Exception with invalid delimiters

Returns

array

Clear the controller parameter stack

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

Parameters

$name

Returns

\Zend_Controller_Dispatcher_Abstract

Formats a string into an action name. This is used to take a raw action name, such as one that would be stored inside a Zend_Controller_Request_Abstract object, and reformat into a proper method name that would be found inside a class extending Zend_Controller_Action.

formatActionName(string $unformatted) : string
inherited_from \Zend_Controller_Dispatcher_Interface::formatActionName()

Parameters

$unformatted

string

Returns

string

Formats a string into a controller name. This is used to take a raw controller name, such as one stored inside a Zend_Controller_Request_Abstract object, and reformat it to a proper class name that a class extending Zend_Controller_Action would use.

formatControllerName(string $unformatted) : string
inherited_from \Zend_Controller_Dispatcher_Interface::formatControllerName()

Parameters

$unformatted

string

Returns

string

Retrieve the default action name (minus formatting)

getDefaultAction() : string
inherited_from \Zend_Controller_Dispatcher_Interface::getDefaultAction()

Returns

string

Retrieve the default controller name (minus formatting)

getDefaultControllerName() : string
inherited_from \Zend_Controller_Dispatcher_Interface::getDefaultControllerName()

Returns

string

Retrieve the default module

getDefaultModule() : string
inherited_from \Zend_Controller_Dispatcher_Interface::getDefaultModule()

Returns

string

Retrieve front controller instance

getFrontController() : \Zend_Controller_Front

Returns

\Zend_Controller_Front

Retrieve a single parameter from the controller parameter stack

getParam(string $name) : mixed
inherited_from \Zend_Controller_Dispatcher_Interface::getParam()

Parameters

$name

string

Returns

mixed

Retrieve action controller instantiation parameters

getParams() : array
inherited_from \Zend_Controller_Dispatcher_Interface::getParams()

Returns

array

Retrieve the path delimiter character(s) used in controller names

getPathDelimiter() : array

Returns

array

Return the registered response object

getResponse() : \Zend_Controller_Response_Abstract | null
inherited_from \Zend_Controller_Dispatcher_Interface::getResponse()

Returns

\Zend_Controller_Response_Abstractnull

Retrieve the word delimiter character(s) used in controller or action names

getWordDelimiter() : array

Returns

array

Set the default action (minus any formatting)

setDefaultAction(string $action) : \Zend_Controller_Dispatcher_Abstract

Parameters

$action

string

Returns

\Zend_Controller_Dispatcher_Abstract

Set the default controller (minus any formatting)

setDefaultControllerName(string $controller) : \Zend_Controller_Dispatcher_Abstract

Parameters

$controller

string

Returns

\Zend_Controller_Dispatcher_Abstract

Set the default module

setDefaultModule(string $module) : \Zend_Controller_Dispatcher_Abstract

Parameters

$module

string

Returns

\Zend_Controller_Dispatcher_Abstract

Set front controller instance

setFrontController(\Zend_Controller_Front $controller) : \Zend_Controller_Dispatcher_Abstract

Parameters

$controller

\Zend_Controller_Front

Returns

\Zend_Controller_Dispatcher_Abstract

Add or modify a parameter to use when instantiating an action controller

setParam(string $name, mixed $value) : \Zend_Controller_Dispatcher_Abstract
inherited_from \Zend_Controller_Dispatcher_Interface::setParam()

Parameters

$name

string

$value

mixed

Returns

\Zend_Controller_Dispatcher_Abstract

Set parameters to pass to action controller constructors

setParams(array $params) : \Zend_Controller_Dispatcher_Abstract
inherited_from \Zend_Controller_Dispatcher_Interface::setParams()

Parameters

$params

array

Returns

\Zend_Controller_Dispatcher_Abstract

Set path delimiter

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.

Parameters

$spec

string

Returns

\Zend_Controller_Dispatcher_Abstract

Set response object to pass to action controllers

setResponse(\Zend_Controller_Response_Abstract|null $response = null) : \Zend_Controller_Dispatcher_Abstract
inherited_from \Zend_Controller_Dispatcher_Interface::setResponse()

Parameters

$response

\Zend_Controller_Response_Abstractnull

Returns

\Zend_Controller_Dispatcher_Abstract

Set word delimiter

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.

Parameters

$spec

stringarray

Returns

\Zend_Controller_Dispatcher_Abstract

Formats a string from a URI into a PHP-friendly name.

_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.

Parameters

$unformatted

string

$isAction

boolean

Defaults to false

Returns

string

 Properties

 

Default action

$_defaultAction : string

Default

'index'
 

Default controller

$_defaultController : string

Default

'index'
 

Default module

$_defaultModule : string

Default

'default'
 

Front Controller instance

$_frontController : \Zend_Controller_Front

Default

 

Array of invocation parameters to use when instantiating action controllers

$_invokeParams : array

Default

array()
 

Path delimiter character

$_pathDelimiter : string

Default

'_'
 

Response object to pass to action controllers, if any

$_response : \Zend_Controller_Response_Abstract | null

Default

null
 

Word delimiter characters

$_wordDelimiter : array

Default

array('-', '.')