Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
array $_controllerDirectory = 'array'Controller directory(ies)
Detailsstring $_curDirectory = ''Current dispatchable directory
Detailsstring $_curModule = ''Current module (formatted)
Details__construct(
array $params
=
array
)
:
voidConstructor: Set current module to default value
DetailsaddControllerDirectory(
string $path, string $module
=
null
)
:
Zend_Controller_Dispatcher_StandardAdd a single path to the controller directory stack
DetailsclassToFilename(
string $class
)
:
stringConvert a class name to a filename
Detailsdispatch(
Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response
)
:
voidDispatch 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 {@link setParam()}.
DetailsformatClassName(
string $moduleName, string $className
)
:
stringFormat action class name
DetailsformatModuleName(
string $unformatted
)
:
stringFormat the module name.
DetailsgetActionMethod(
Zend_Controller_Request_Abstract $request
)
:
stringDetermine the action name
First attempt to retrieve from request; then from request params using action key; default to default action
Returns formatted action name
DetailsgetControllerClass(
Zend_Controller_Request_Abstract $request
)
:
string|falseGet controller class name
Try request first; if not found, try pulling from request parameter; if still not found, fallback to default
DetailsgetControllerDirectory(
string $module
=
null
)
:
array|stringReturn the currently set directories for Zend_Controller_Action class lookup
If a module is specified, returns just that directory.
DetailsgetDefaultControllerClass(
Zend_Controller_Request_Abstract $request
)
:
stringRetrieve 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.
DetailsgetDispatchDirectory(
)
:
stringReturn the value of the currently selected dispatch directory (as set by {@link getController()})
DetailsisDispatchable(
$request
)
:
booleanReturns 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.
DetailsisValidModule(
string $module
)
:
boolDetermine if a given module is valid
DetailsloadClass(
string $className
)
:
stringLoad a controller class
Attempts to load the controller class file from {@link getControllerDirectory()}. If the controller belongs to a module, looks for the module prefix to the controller class.
DetailsremoveControllerDirectory(
string $module
)
:
boolRemove a controller directory by module name
DetailssetControllerDirectory(
array|string $directory, $module
=
null
)
:
Zend_Controller_Dispatcher_StandardSet controller directory
Details