|
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 * @category Zend |
|
16 * @package Zend_Tool |
|
17 * @subpackage Framework |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: Request.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * @category Zend |
|
25 * @package Zend_Tool |
|
26 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
27 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
28 */ |
|
29 class Zend_Tool_Framework_Client_Request |
|
30 { |
|
31 |
|
32 /** |
|
33 * @var string |
|
34 */ |
|
35 protected $_providerName = null; |
|
36 |
|
37 /** |
|
38 * @var string |
|
39 */ |
|
40 protected $_specialtyName = null; |
|
41 |
|
42 /** |
|
43 * @var string |
|
44 */ |
|
45 protected $_actionName = null; |
|
46 |
|
47 /** |
|
48 * @var array |
|
49 */ |
|
50 protected $_actionParameters = array(); |
|
51 |
|
52 /** |
|
53 * @var array |
|
54 */ |
|
55 protected $_providerParameters = array(); |
|
56 |
|
57 /** |
|
58 * @var bool |
|
59 */ |
|
60 protected $_isPretend = false; |
|
61 |
|
62 /** |
|
63 * @var bool |
|
64 */ |
|
65 protected $_isDebug = false; |
|
66 |
|
67 /** |
|
68 * @var bool |
|
69 */ |
|
70 protected $_isVerbose = false; |
|
71 |
|
72 /** |
|
73 * @var bool |
|
74 */ |
|
75 protected $_isDispatchable = true; |
|
76 |
|
77 /** |
|
78 * setProviderName() |
|
79 * |
|
80 * @param string $providerName |
|
81 * @return Zend_Tool_Framework_Client_Request |
|
82 */ |
|
83 public function setProviderName($providerName) |
|
84 { |
|
85 $this->_providerName = $providerName; |
|
86 return $this; |
|
87 } |
|
88 |
|
89 /** |
|
90 * getProviderName() |
|
91 * |
|
92 * @return string |
|
93 */ |
|
94 public function getProviderName() |
|
95 { |
|
96 return $this->_providerName; |
|
97 } |
|
98 |
|
99 /** |
|
100 * setSpecialtyName() |
|
101 * |
|
102 * @param string $specialtyName |
|
103 * @return Zend_Tool_Framework_Client_Request |
|
104 */ |
|
105 public function setSpecialtyName($specialtyName) |
|
106 { |
|
107 $this->_specialtyName = $specialtyName; |
|
108 return $this; |
|
109 } |
|
110 |
|
111 /** |
|
112 * getSpecialtyName() |
|
113 * |
|
114 * @return string |
|
115 */ |
|
116 public function getSpecialtyName() |
|
117 { |
|
118 return $this->_specialtyName; |
|
119 } |
|
120 |
|
121 /** |
|
122 * setActionName() |
|
123 * |
|
124 * @param string $actionName |
|
125 * @return Zend_Tool_Framework_Client_Request |
|
126 */ |
|
127 public function setActionName($actionName) |
|
128 { |
|
129 $this->_actionName = $actionName; |
|
130 return $this; |
|
131 } |
|
132 |
|
133 /** |
|
134 * getActionName() |
|
135 * |
|
136 * @return string |
|
137 */ |
|
138 public function getActionName() |
|
139 { |
|
140 return $this->_actionName; |
|
141 } |
|
142 |
|
143 /** |
|
144 * setActionParameter() |
|
145 * |
|
146 * @param string $parameterName |
|
147 * @param string $parameterValue |
|
148 * @return Zend_Tool_Framework_Client_Request |
|
149 */ |
|
150 public function setActionParameter($parameterName, $parameterValue) |
|
151 { |
|
152 $this->_actionParameters[$parameterName] = $parameterValue; |
|
153 return $this; |
|
154 } |
|
155 |
|
156 /** |
|
157 * getActionParameters() |
|
158 * |
|
159 * @return array |
|
160 */ |
|
161 public function getActionParameters() |
|
162 { |
|
163 return $this->_actionParameters; |
|
164 } |
|
165 |
|
166 /** |
|
167 * getActionParameter() |
|
168 * |
|
169 * @param string $parameterName |
|
170 * @return string |
|
171 */ |
|
172 public function getActionParameter($parameterName) |
|
173 { |
|
174 return (isset($this->_actionParameters[$parameterName])) ? $this->_actionParameters[$parameterName] : null; |
|
175 } |
|
176 |
|
177 /** |
|
178 * setProviderParameter() |
|
179 * |
|
180 * @param string $parameterName |
|
181 * @param string $parameterValue |
|
182 * @return Zend_Tool_Framework_Client_Request |
|
183 */ |
|
184 public function setProviderParameter($parameterName, $parameterValue) |
|
185 { |
|
186 $this->_providerParameters[$parameterName] = $parameterValue; |
|
187 return $this; |
|
188 } |
|
189 |
|
190 /** |
|
191 * getProviderParameters() |
|
192 * |
|
193 * @return array |
|
194 */ |
|
195 public function getProviderParameters() |
|
196 { |
|
197 return $this->_providerParameters; |
|
198 } |
|
199 |
|
200 /** |
|
201 * getProviderParameter() |
|
202 * |
|
203 * @param string $parameterName |
|
204 * @return string |
|
205 */ |
|
206 public function getProviderParameter($parameterName) |
|
207 { |
|
208 return (isset($this->_providerParameters[$parameterName])) ? $this->_providerParameters[$parameterName] : null; |
|
209 } |
|
210 |
|
211 /** |
|
212 * setPretend() |
|
213 * |
|
214 * @param bool $pretend |
|
215 * @return Zend_Tool_Framework_Client_Request |
|
216 */ |
|
217 public function setPretend($pretend) |
|
218 { |
|
219 $this->_isPretend = (bool) $pretend; |
|
220 return $this; |
|
221 } |
|
222 |
|
223 /** |
|
224 * isPretend() - Whether or not this is a pretend request |
|
225 * |
|
226 * @return bool |
|
227 */ |
|
228 public function isPretend() |
|
229 { |
|
230 return $this->_isPretend; |
|
231 } |
|
232 |
|
233 /** |
|
234 * setDebug() |
|
235 * |
|
236 * @param bool $pretend |
|
237 * @return Zend_Tool_Framework_Client_Request |
|
238 */ |
|
239 public function setDebug($debug) |
|
240 { |
|
241 $this->_isDebug = (bool) $debug; |
|
242 return $this; |
|
243 } |
|
244 |
|
245 /** |
|
246 * isDebug() - Whether or not this is a debug enabled request |
|
247 * |
|
248 * @return bool |
|
249 */ |
|
250 public function isDebug() |
|
251 { |
|
252 return $this->_isDebug; |
|
253 } |
|
254 |
|
255 /** |
|
256 * setVerbose() |
|
257 * |
|
258 * @param bool $verbose |
|
259 * @return Zend_Tool_Framework_Client_Request |
|
260 */ |
|
261 public function setVerbose($verbose) |
|
262 { |
|
263 $this->_isVerbose = (bool) $verbose; |
|
264 return $this; |
|
265 } |
|
266 |
|
267 /** |
|
268 * isVerbose() - Whether or not this is a verbose enabled request |
|
269 * |
|
270 * @return bool |
|
271 */ |
|
272 public function isVerbose() |
|
273 { |
|
274 return $this->_isVerbose; |
|
275 } |
|
276 |
|
277 /** |
|
278 * setDispatchable() |
|
279 * |
|
280 * @param bool $dispatchable |
|
281 * @return Zend_Tool_Framework_Client_Request |
|
282 */ |
|
283 public function setDispatchable($dispatchable) |
|
284 { |
|
285 $this->_isDispatchable = (bool) $dispatchable; |
|
286 return $this; |
|
287 } |
|
288 |
|
289 /** |
|
290 * isDispatchable() Is this request Dispatchable? |
|
291 * |
|
292 * @return bool |
|
293 */ |
|
294 public function isDispatchable() |
|
295 { |
|
296 return $this->_isDispatchable; |
|
297 } |
|
298 |
|
299 } |