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

Public Member Functions

 route (Zend_Controller_Request_Abstract $dispatcher)
 Processes a request and sets its controller and action.
 
 assemble ($userParams, $name=null, $reset=false, $encode=true)
 Generates a URL path that can be used in URL creation, redirection, etc.
 
 getFrontController ()
 Retrieve Front Controller.
 
 setFrontController (Zend_Controller_Front $controller)
 Set Front Controller.
 
 setParam ($name, $value)
 Add or modify a parameter with which to instantiate any helper objects.
 
 setParams (array $params)
 Set an array of a parameters to pass to helper object constructors.
 
 getParam ($name)
 Retrieve a single parameter from the controller parameter stack.
 
 getParams ()
 Retrieve the parameters to pass to helper object constructors.
 
 clearParams ($name=null)
 Clear the controller parameter stack.
 

Member Function Documentation

assemble (   $userParams,
  $name = null,
  $reset = false,
  $encode = true 
)

Generates a URL path that can be used in URL creation, redirection, etc.

May be passed user params to override ones from URI, Request or even defaults. If passed parameter has a value of null, it's URL variable will be reset to default.

If null is passed as a route name assemble will use the current Route or 'default' if current is not yet set.

Reset is used to signal that all parameters should be reset to it's defaults. Ignoring all URL specified values. User specified params still get precedence.

Encode tells to url encode resulting path parts.

Parameters
array$userParamsOptions passed by a user used to override parameters
mixed$nameThe name of a Route to use
bool$resetWhether to reset to the route defaults ignoring URL params
bool$encodeTells to encode URL parts on output
Exceptions
Zend_Controller_Router_Exception
Returns
string Resulting URL path

Implemented in Zend_Controller_Router_Rewrite.

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_Router_Interface

Implemented in Zend_Controller_Router_Abstract.

getFrontController ( )

Retrieve Front Controller.

Returns
Zend_Controller_Front

Implemented in Zend_Controller_Router_Abstract.

getParam (   $name)

Retrieve a single parameter from the controller parameter stack.

Parameters
string$name
Returns
mixed

Implemented in Zend_Controller_Router_Abstract.

getParams ( )

Retrieve the parameters to pass to helper object constructors.

Returns
array

Implemented in Zend_Controller_Router_Abstract.

route ( Zend_Controller_Request_Abstract  $dispatcher)

Processes a request and sets its controller and action.

If no route was possible, an exception is thrown.

Parameters
Zend_Controller_Request_Abstract
Exceptions
Zend_Controller_Router_Exception
Returns
Zend_Controller_Request_Abstract|boolean

Implemented in Zend_Controller_Router_Rewrite.

setFrontController ( Zend_Controller_Front  $controller)

Set Front Controller.

Parameters
Zend_Controller_Front$controller
Returns
Zend_Controller_Router_Interface

Implemented in Zend_Controller_Router_Abstract.

setParam (   $name,
  $value 
)

Add or modify a parameter with which to instantiate any helper objects.

Parameters
string$name
mixed$param
Returns
Zend_Controller_Router_Interface

Implemented in Zend_Controller_Router_Abstract.

setParams ( array  $params)

Set an array of a parameters to pass to helper object constructors.

Parameters
array$params
Returns
Zend_Controller_Router_Interface

Implemented in Zend_Controller_Router_Abstract.