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

 Methods

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

assemble(array $userParams, mixed $name = null, boolean $reset = false, boolean $encode = true) : string

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

$userParams

array

Options passed by a user used to override parameters

$name

mixed

The name of a Route to use

$reset

boolean

Whether to reset to the route defaults ignoring URL params

$encode

boolean

Tells to encode URL parts on output

Exceptions

\Zend_Controller_Router_Exception

Returns

stringResulting URL path

Clear the controller parameter stack

clearParams($name = null) : \Zend_Controller_Router_Interface

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

$name

Returns

\Zend_Controller_Router_Interface

Retrieve Front Controller

getFrontController() : \Zend_Controller_Front

Returns

\Zend_Controller_Front

Retrieve a single parameter from the controller parameter stack

getParam(string $name) : mixed

Parameters

$name

string

Returns

mixed

Retrieve the parameters to pass to helper object constructors

getParams() : array

Returns

array

Processes a request and sets its controller and action. If no route was possible, an exception is thrown.

route(\Zend_Controller_Request_Abstract $dispatcher) : \Zend_Controller_Request_Abstract | boolean

Parameters

$dispatcher

Exceptions

\Zend_Controller_Router_Exception

Returns

\Zend_Controller_Request_Abstractboolean

Set Front Controller

setFrontController(\Zend_Controller_Front $controller) : \Zend_Controller_Router_Interface

Parameters

$controller

\Zend_Controller_Front

Returns

\Zend_Controller_Router_Interface

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

setParam(string $name, mixed $value) : \Zend_Controller_Router_Interface

Parameters

$name

string

$value

mixed

Returns

\Zend_Controller_Router_Interface

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

setParams(array $params) : \Zend_Controller_Router_Interface

Parameters

$params

array

Returns

\Zend_Controller_Router_Interface