7
* This source file is subject to the new BSD license that is bundled
8
* with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://framework.zend.com/license/new-bsd
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to license@zend.com so we can send you a copy immediately.
15
* @package Zend_Controller
17
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
18
* @license http://framework.zend.com/license/new-bsd New BSD License
22
* @package Zend_Controller
24
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
25
* @license http://framework.zend.com/license/new-bsd New BSD License
27
interface Zend_Controller_Router_Interface
30
* Processes a request and sets its controller and action. If
31
* no route was possible, an exception is thrown.
33
* @param Zend_Controller_Request_Abstract
34
* @throws Zend_Controller_Router_Exception
35
* @return Zend_Controller_Request_Abstract|boolean
37
public function route(Zend_Controller_Request_Abstract $dispatcher);
40
* Generates a URL path that can be used in URL creation, redirection, etc.
42
* May be passed user params to override ones from URI, Request or even defaults.
43
* If passed parameter has a value of null, it's URL variable will be reset to
46
* If null is passed as a route name assemble will use the current Route or 'default'
47
* if current is not yet set.
49
* Reset is used to signal that all parameters should be reset to it's defaults.
50
* Ignoring all URL specified values. User specified params still get precedence.
52
* Encode tells to url encode resulting path parts.
54
* @param array $userParams Options passed by a user used to override parameters
55
* @param mixed $name The name of a Route to use
56
* @param bool $reset Whether to reset to the route defaults ignoring URL params
57
* @param bool $encode Tells to encode URL parts on output
58
* @throws Zend_Controller_Router_Exception
59
* @return string Resulting URL path
61
public function assemble($userParams, $name = null, $reset = false, $encode = true);
64
* Retrieve Front Controller
66
* @return Zend_Controller_Front
68
public function getFrontController();
71
* Set Front Controller
73
* @param Zend_Controller_Front $controller
74
* @return Zend_Controller_Router_Interface
76
public function setFrontController(Zend_Controller_Front $controller);
79
* Add or modify a parameter with which to instantiate any helper objects
83
* @return Zend_Controller_Router_Interface
85
public function setParam($name, $value);
88
* Set an array of a parameters to pass to helper object constructors
90
* @param array $params
91
* @return Zend_Controller_Router_Interface
93
public function setParams(array $params);
96
* Retrieve a single parameter from the controller parameter stack
101
public function getParam($name);
104
* Retrieve the parameters to pass to helper object constructors
108
public function getParams();
111
* Clear the controller parameter stack
113
* By default, clears all parameters. If a parameter name is given, clears
114
* only that parameter; if an array of parameter names is provided, clears
117
* @param null|string|array single key or array of keys for params to clear
118
* @return Zend_Controller_Router_Interface
120
public function clearParams($name = null);