~chroot64bit/zivios/gentoo-experimental

« back to all changes in this revision

Viewing changes to application/library/Zend/Controller/Router/Interface.php

  • Committer: Mustafa A. Hashmi
  • Date: 2008-12-04 13:32:21 UTC
  • Revision ID: mhashmi@zivios.org-20081204133221-0nd1trunwevijj38
Inclusion of new installation framework with ties to zend layout and dojo layout

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Zend Framework
 
4
 *
 
5
 * LICENSE
 
6
 *
 
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.
 
14
 *
 
15
 * @package    Zend_Controller
 
16
 * @subpackage Router
 
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
 
19
 */
 
20
 
 
21
/**
 
22
 * @package    Zend_Controller
 
23
 * @subpackage Router
 
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
 
26
 */
 
27
interface Zend_Controller_Router_Interface
 
28
{
 
29
    /**
 
30
     * Processes a request and sets its controller and action.  If
 
31
     * no route was possible, an exception is thrown.
 
32
     *
 
33
     * @param  Zend_Controller_Request_Abstract
 
34
     * @throws Zend_Controller_Router_Exception
 
35
     * @return Zend_Controller_Request_Abstract|boolean
 
36
     */
 
37
    public function route(Zend_Controller_Request_Abstract $dispatcher);
 
38
 
 
39
    /**
 
40
     * Generates a URL path that can be used in URL creation, redirection, etc. 
 
41
     * 
 
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
 
44
     * default. 
 
45
     * 
 
46
     * If null is passed as a route name assemble will use the current Route or 'default'
 
47
     * if current is not yet set.
 
48
     * 
 
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.
 
51
     * 
 
52
     * Encode tells to url encode resulting path parts.     
 
53
     *
 
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
 
60
     */
 
61
    public function assemble($userParams, $name = null, $reset = false, $encode = true);
 
62
    
 
63
    /**
 
64
     * Retrieve Front Controller
 
65
     *
 
66
     * @return Zend_Controller_Front
 
67
     */
 
68
    public function getFrontController();
 
69
 
 
70
    /**
 
71
     * Set Front Controller
 
72
     *
 
73
     * @param Zend_Controller_Front $controller
 
74
     * @return Zend_Controller_Router_Interface
 
75
     */
 
76
    public function setFrontController(Zend_Controller_Front $controller);
 
77
    
 
78
    /**
 
79
     * Add or modify a parameter with which to instantiate any helper objects
 
80
     *
 
81
     * @param string $name
 
82
     * @param mixed $param
 
83
     * @return Zend_Controller_Router_Interface
 
84
     */
 
85
    public function setParam($name, $value);
 
86
 
 
87
    /**
 
88
     * Set an array of a parameters to pass to helper object constructors
 
89
     *
 
90
     * @param array $params
 
91
     * @return Zend_Controller_Router_Interface
 
92
     */
 
93
    public function setParams(array $params);
 
94
 
 
95
    /**
 
96
     * Retrieve a single parameter from the controller parameter stack
 
97
     *
 
98
     * @param string $name
 
99
     * @return mixed
 
100
     */
 
101
    public function getParam($name);
 
102
 
 
103
    /**
 
104
     * Retrieve the parameters to pass to helper object constructors
 
105
     *
 
106
     * @return array
 
107
     */
 
108
    public function getParams();
 
109
 
 
110
    /**
 
111
     * Clear the controller parameter stack
 
112
     *
 
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
 
115
     * each.
 
116
     *
 
117
     * @param null|string|array single key or array of keys for params to clear
 
118
     * @return Zend_Controller_Router_Interface
 
119
     */
 
120
    public function clearParams($name = null);
 
121
    
 
122
}