1 | <?php |
||
22 | class EE_Request implements LegacyRequestInterface, InterminableInterface |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * @var RequestInterface $request |
||
27 | */ |
||
28 | private $request; |
||
29 | |||
30 | /** |
||
31 | * whether current request is for the admin but NOT via AJAX |
||
32 | * |
||
33 | * @var boolean $admin |
||
34 | */ |
||
35 | public $admin = false; |
||
36 | |||
37 | /** |
||
38 | * whether current request is via AJAX |
||
39 | * |
||
40 | * @var boolean $ajax |
||
41 | */ |
||
42 | public $ajax = false; |
||
43 | |||
44 | /** |
||
45 | * whether current request is via AJAX from the frontend of the site |
||
46 | * |
||
47 | * @var boolean $front_ajax |
||
48 | */ |
||
49 | public $front_ajax = false; |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @deprecated 4.9.53 |
||
54 | * @param array $get |
||
55 | * @param array $post |
||
56 | * @param array $cookie |
||
57 | * @param array $server |
||
58 | */ |
||
59 | public function __construct( |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @return RequestInterface |
||
70 | * @throws InvalidArgumentException |
||
71 | * @throws InvalidInterfaceException |
||
72 | * @throws InvalidDataTypeException |
||
73 | */ |
||
74 | private function request() |
||
83 | |||
84 | |||
85 | /** |
||
86 | * @param RequestInterface $request |
||
87 | */ |
||
88 | public function setRequest(RequestInterface $request) |
||
92 | |||
93 | |||
94 | |||
95 | /** |
||
96 | * @deprecated 4.9.53 |
||
97 | * @return array |
||
98 | * @throws InvalidArgumentException |
||
99 | * @throws InvalidDataTypeException |
||
100 | * @throws InvalidInterfaceException |
||
101 | */ |
||
102 | public function get_params() |
||
106 | |||
107 | |||
108 | |||
109 | /** |
||
110 | * @deprecated 4.9.53 |
||
111 | * @return array |
||
112 | * @throws InvalidArgumentException |
||
113 | * @throws InvalidDataTypeException |
||
114 | * @throws InvalidInterfaceException |
||
115 | */ |
||
116 | public function post_params() |
||
120 | |||
121 | |||
122 | |||
123 | /** |
||
124 | * @deprecated 4.9.53 |
||
125 | * @return array |
||
126 | * @throws InvalidArgumentException |
||
127 | * @throws InvalidDataTypeException |
||
128 | * @throws InvalidInterfaceException |
||
129 | */ |
||
130 | public function cookie_params() |
||
134 | |||
135 | |||
136 | /** |
||
137 | * @deprecated 4.9.53 |
||
138 | * @return array |
||
139 | * @throws InvalidArgumentException |
||
140 | * @throws InvalidDataTypeException |
||
141 | * @throws InvalidInterfaceException |
||
142 | */ |
||
143 | public function server_params() |
||
147 | |||
148 | |||
149 | |||
150 | /** |
||
151 | * returns contents of $_REQUEST |
||
152 | * |
||
153 | * @deprecated 4.9.53 |
||
154 | * @return array |
||
155 | * @throws InvalidArgumentException |
||
156 | * @throws InvalidDataTypeException |
||
157 | * @throws InvalidInterfaceException |
||
158 | */ |
||
159 | public function params() |
||
163 | |||
164 | |||
165 | |||
166 | /** |
||
167 | * @deprecated 4.9.53 |
||
168 | * @param $key |
||
169 | * @param $value |
||
170 | * @param bool $override_ee |
||
171 | * @return void |
||
172 | * @throws InvalidArgumentException |
||
173 | * @throws InvalidDataTypeException |
||
174 | * @throws InvalidInterfaceException |
||
175 | */ |
||
176 | public function set($key, $value, $override_ee = false) |
||
180 | |||
181 | |||
182 | |||
183 | /** |
||
184 | * returns the value for a request param if the given key exists |
||
185 | * |
||
186 | * @deprecated 4.9.53 |
||
187 | * @param $key |
||
188 | * @param null $default |
||
189 | * @return mixed |
||
190 | * @throws InvalidArgumentException |
||
191 | * @throws InvalidDataTypeException |
||
192 | * @throws InvalidInterfaceException |
||
193 | */ |
||
194 | public function get($key, $default = null) |
||
198 | |||
199 | |||
200 | |||
201 | /** |
||
202 | * check if param exists |
||
203 | * |
||
204 | * @deprecated 4.9.53 |
||
205 | * @param $key |
||
206 | * @return bool |
||
207 | * @throws InvalidArgumentException |
||
208 | * @throws InvalidDataTypeException |
||
209 | * @throws InvalidInterfaceException |
||
210 | */ |
||
211 | public function is_set($key) |
||
215 | |||
216 | |||
217 | |||
218 | /** |
||
219 | * remove param |
||
220 | * |
||
221 | * @deprecated 4.9.53 |
||
222 | * @param $key |
||
223 | * @param bool $unset_from_global_too |
||
224 | * @throws InvalidArgumentException |
||
225 | * @throws InvalidDataTypeException |
||
226 | * @throws InvalidInterfaceException |
||
227 | */ |
||
228 | public function un_set($key, $unset_from_global_too = false) |
||
232 | |||
233 | |||
234 | |||
235 | /** |
||
236 | * @deprecated 4.9.53 |
||
237 | * @return string |
||
238 | * @throws InvalidArgumentException |
||
239 | * @throws InvalidDataTypeException |
||
240 | * @throws InvalidInterfaceException |
||
241 | */ |
||
242 | public function ip_address() |
||
246 | |||
247 | |||
248 | /** |
||
249 | * @deprecated 4.9.53 |
||
250 | * @return bool |
||
251 | * @throws InvalidArgumentException |
||
252 | * @throws InvalidDataTypeException |
||
253 | * @throws InvalidInterfaceException |
||
254 | */ |
||
255 | public function isAdmin() |
||
259 | |||
260 | |||
261 | /** |
||
262 | * @deprecated 4.9.53 |
||
263 | * @return mixed |
||
264 | * @throws InvalidArgumentException |
||
265 | * @throws InvalidDataTypeException |
||
266 | * @throws InvalidInterfaceException |
||
267 | */ |
||
268 | public function isAjax() |
||
272 | |||
273 | |||
274 | /** |
||
275 | * @deprecated 4.9.53 |
||
276 | * @return mixed |
||
277 | * @throws InvalidArgumentException |
||
278 | * @throws InvalidDataTypeException |
||
279 | * @throws InvalidInterfaceException |
||
280 | */ |
||
281 | public function isFrontAjax() |
||
285 | |||
286 | |||
287 | /** |
||
288 | * @deprecated 4.9.53 |
||
289 | * @return mixed|string |
||
290 | * @throws InvalidArgumentException |
||
291 | * @throws InvalidDataTypeException |
||
292 | * @throws InvalidInterfaceException |
||
293 | */ |
||
294 | public function requestUri() |
||
298 | |||
299 | |||
300 | /** |
||
301 | * @deprecated 4.9.53 |
||
302 | * @return string |
||
303 | * @throws InvalidArgumentException |
||
304 | * @throws InvalidDataTypeException |
||
305 | * @throws InvalidInterfaceException |
||
306 | */ |
||
307 | public function userAgent() |
||
311 | |||
312 | |||
313 | /** |
||
314 | * @deprecated 4.9.53 |
||
315 | * @param string $user_agent |
||
316 | * @throws InvalidArgumentException |
||
317 | * @throws InvalidDataTypeException |
||
318 | * @throws InvalidInterfaceException |
||
319 | */ |
||
320 | public function setUserAgent($user_agent = '') |
||
324 | |||
325 | |||
326 | /** |
||
327 | * @deprecated 4.9.53 |
||
328 | * @return bool |
||
329 | * @throws InvalidArgumentException |
||
330 | * @throws InvalidDataTypeException |
||
331 | * @throws InvalidInterfaceException |
||
332 | */ |
||
333 | public function isBot() |
||
337 | |||
338 | |||
339 | /** |
||
340 | * @deprecated 4.9.53 |
||
341 | * @param bool $is_bot |
||
342 | * @throws InvalidArgumentException |
||
343 | * @throws InvalidDataTypeException |
||
344 | * @throws InvalidInterfaceException |
||
345 | */ |
||
346 | public function setIsBot($is_bot) |
||
350 | |||
351 | |||
352 | |||
353 | } |
||
354 | // End of file EE_Request.core.php |
||
356 |