Zend Framework  1.12
Public Member Functions | List of all members
Zend_Controller_Dispatcher_Interface Interface Reference

Public Member Functions

 formatControllerName ($unformatted)
 Formats a string into a controller name.
 
 formatModuleName ($unformatted)
 Formats a string into a module name.
 
 formatActionName ($unformatted)
 Formats a string into an action name.
 
 isDispatchable (Zend_Controller_Request_Abstract $request)
 Returns TRUE if an action can be dispatched, or FALSE otherwise.
 
 setParam ($name, $value)
 Add or modify a parameter with which to instantiate an Action Controller.
 
 setParams (array $params)
 Set an array of a parameters to pass to the Action Controller constructor.
 
 getParam ($name)
 Retrieve a single parameter from the controller parameter stack.
 
 getParams ()
 Retrieve the parameters to pass to the Action Controller constructor.
 
 clearParams ($name=null)
 Clear the controller parameter stack.
 
 setResponse (Zend_Controller_Response_Abstract $response=null)
 Set the response object to use, if any.
 
 getResponse ()
 Retrieve the response object, if any.
 
 addControllerDirectory ($path, $args=null)
 Add a controller directory to the controller directory stack.
 
 setControllerDirectory ($path)
 Set the directory where controller files are stored.
 
 getControllerDirectory ()
 Return the currently set directory(ies) for controller file lookup.
 
 dispatch (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response)
 Dispatches a request object to a controller/action.
 
 isValidModule ($module)
 Whether or not a given module is valid.
 
 getDefaultModule ()
 Retrieve the default module name.
 
 getDefaultControllerName ()
 Retrieve the default controller name.
 
 getDefaultAction ()
 Retrieve the default action.
 

Member Function Documentation

addControllerDirectory (   $path,
  $args = null 
)

Add a controller directory to the controller directory stack.

Parameters
string$path
string$args
Returns
Zend_Controller_Dispatcher_Interface

Implemented in Zend_Controller_Dispatcher_Standard.

clearParams (   $name = null)

Clear the controller parameter stack.

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.

Parameters
null|string|arraysingle key or array of keys for params to clear
Returns
Zend_Controller_Dispatcher_Interface

Implemented in Zend_Controller_Dispatcher_Abstract.

Dispatches a request object to a controller/action.

If the action requests a forward to another action, a new request will be returned.

Parameters
Zend_Controller_Request_Abstract$request
Zend_Controller_Response_Abstract$response
Returns
void

Implemented in Zend_Controller_Dispatcher_Standard.

formatActionName (   $unformatted)

Formats a string into an action name.

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

Parameters
string$unformatted
Returns
string

Implemented in Zend_Controller_Dispatcher_Abstract.

formatControllerName (   $unformatted)

Formats a string into a controller name.

This is used to take a raw controller name, such as one that would be packaged inside a request object, and reformat it to a proper class name that a class extending Zend_Controller_Action would use.

Parameters
string$unformatted
Returns
string

Implemented in Zend_Controller_Dispatcher_Abstract.

formatModuleName (   $unformatted)

Formats a string into a module name.

This is used to take a raw module name, such as one that would be packaged inside a request object, and reformat it to a proper directory/class name that a class extending Zend_Controller_Action would use.

Parameters
string$unformatted
Returns
string

Implemented in Zend_Controller_Dispatcher_Standard.

getControllerDirectory ( )

Return the currently set directory(ies) for controller file lookup.

Returns
array
getDefaultAction ( )

Retrieve the default action.

Returns
string

Implemented in Zend_Controller_Dispatcher_Abstract.

getDefaultControllerName ( )

Retrieve the default controller name.

Returns
string

Implemented in Zend_Controller_Dispatcher_Abstract.

getDefaultModule ( )

Retrieve the default module name.

Returns
string

Implemented in Zend_Controller_Dispatcher_Abstract.

getParam (   $name)

Retrieve a single parameter from the controller parameter stack.

Parameters
string$name
Returns
mixed

Implemented in Zend_Controller_Dispatcher_Abstract.

getParams ( )

Retrieve the parameters to pass to the Action Controller constructor.

Returns
array

Implemented in Zend_Controller_Dispatcher_Abstract.

getResponse ( )

Retrieve the response object, if any.

Returns
Zend_Controller_Response_Abstract|null

Implemented in Zend_Controller_Dispatcher_Abstract.

isDispatchable ( Zend_Controller_Request_Abstract  $request)

Returns TRUE if an action can be dispatched, or FALSE otherwise.

Parameters
Zend_Controller_Request_Abstract$request
Returns
boolean

Implemented in Zend_Controller_Dispatcher_Standard.

isValidModule (   $module)

Whether or not a given module is valid.

Parameters
string$module
Returns
boolean

Implemented in Zend_Controller_Dispatcher_Standard.

setControllerDirectory (   $path)

Set the directory where controller files are stored.

Specify a string or an array; if an array is specified, all paths will be added.

Parameters
string | array$dir
Returns
Zend_Controller_Dispatcher_Interface
setParam (   $name,
  $value 
)

Add or modify a parameter with which to instantiate an Action Controller.

Parameters
string$name
mixed$value
Returns
Zend_Controller_Dispatcher_Interface

Implemented in Zend_Controller_Dispatcher_Abstract.

setParams ( array  $params)

Set an array of a parameters to pass to the Action Controller constructor.

Parameters
array$params
Returns
Zend_Controller_Dispatcher_Interface

Implemented in Zend_Controller_Dispatcher_Abstract.

setResponse ( Zend_Controller_Response_Abstract  $response = null)

Set the response object to use, if any.

Parameters
Zend_Controller_Response_Abstract | null$response
Returns
void

Implemented in Zend_Controller_Dispatcher_Abstract.