1 <?php
2 /* --------------------------------------------------------------
3 HttpContextInterface.inc.php 2015-07-22 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12
13 /**
14 * Interface HttpContextInterface
15 *
16 * @category System
17 * @package Http
18 * @subpackage Interfaces
19 */
20 interface HttpContextInterface
21 {
22 /**
23 * Returns an item of the $_SERVER array by the given key name.
24 *
25 * @param string $keyName Key to determine which value of the $_SERVER array should be returned.
26 *
27 * @return array|string|int|double Expected item of $_SERVER array.
28 */
29 public function getServerItem($keyName);
30
31
32 /**
33 * Returns an item of the $_GET array by the given key name.
34 *
35 * @param string $keyName Key to determine which value of the $_GET array should be returned.
36 *
37 * @return array|string|int|double Expected item of $_GET array.
38 */
39 public function getGetItem($keyName);
40
41
42 /**
43 * Returns an item of the $_POST array by the given key name.
44 *
45 * @param string $keyName Key to determine which value of the $_POST array should be returned.
46 *
47 * @return array|string|int|double Expected item of $_POST array.
48 */
49 public function getPostItem($keyName);
50
51
52 /**
53 * Returns an item of the $_COOKIE array by the given key name.
54 *
55 * @param string $keyName Key to determine which value of the $_COOKIE array should be returned.
56 *
57 * @return array|string|int|double Expected item of $_COOKIE array.
58 */
59 public function getCookieItem($keyName);
60
61
62 /**
63 * Returns an item of the $_SESSION array by the given key name.
64 *
65 * @param string $keyName Key to determine which value of the $_SESSION array should be returned.
66 *
67 * @return array|string|int|double Expected item of $_SESSION array.
68 */
69 public function getSessionItem($keyName);
70
71
72 /**
73 * Returns an array which is equal to the global $_GET variable in an object oriented layer.
74 *
75 * @return array Array which is equal to $_GET.
76 */
77 public function getGetArray();
78
79
80 /**
81 * Returns an array which is equal to the global $_POST variable in an object oriented layer.
82 *
83 * @return array Array which is equal to $_POST.
84 */
85 public function getPostArray();
86 }