@@ 40-47 (lines=8) @@ | ||
37 | * @param string $value |
|
38 | * @return string|boolean |
|
39 | */ |
|
40 | public function get($value) |
|
41 | { |
|
42 | if (!isset($this->get[$value])) { |
|
43 | return false; |
|
44 | } else { |
|
45 | return $this->get[$value]; |
|
46 | } |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * Get a parameter passed by POST (the same as $_POST). If not found return false. |
|
@@ 55-62 (lines=8) @@ | ||
52 | * @param string $value |
|
53 | * @return string|boolean |
|
54 | */ |
|
55 | public function post($value) |
|
56 | { |
|
57 | if (!isset($this->post[$value])) { |
|
58 | return false; |
|
59 | } else { |
|
60 | return $this->post[$value]; |
|
61 | } |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * Get the parameters sent by server (the same as $_SERVER). If not found return false. |
|
@@ 70-77 (lines=8) @@ | ||
67 | * @param string $value |
|
68 | * @return string|boolean |
|
69 | */ |
|
70 | public function server($value) |
|
71 | { |
|
72 | if (!isset($this->server[$value])) { |
|
73 | return false; |
|
74 | } else { |
|
75 | return $this->server[$value]; |
|
76 | } |
|
77 | } |
|
78 | ||
79 | /** |
|
80 | * Get a server session value(the same as $_SESSION). If not found return false. |
|
@@ 85-92 (lines=8) @@ | ||
82 | * @param string $value |
|
83 | * @return string|boolean |
|
84 | */ |
|
85 | public function session($value) |
|
86 | { |
|
87 | if (!isset($this->session[$value])) { |
|
88 | return false; |
|
89 | } else { |
|
90 | return $this->session[$value]; |
|
91 | } |
|
92 | } |
|
93 | ||
94 | /** |
|
95 | * Get the cookie sent by the client (the same as $_COOKIE). If not found return false. |
|
@@ 100-107 (lines=8) @@ | ||
97 | * @param string $value |
|
98 | * @return string|boolean |
|
99 | */ |
|
100 | public function cookie($value) |
|
101 | { |
|
102 | if (!isset($this->cookie[$value])) { |
|
103 | return false; |
|
104 | } else { |
|
105 | return $this->cookie[$value]; |
|
106 | } |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * Get a value from any of get, post, server, cookie or session. If not found return false. |
|
@@ 115-122 (lines=8) @@ | ||
112 | * @param string $value |
|
113 | * @return string|boolean |
|
114 | */ |
|
115 | public function request($value) |
|
116 | { |
|
117 | if (!isset($this->request[$value])) { |
|
118 | return false; |
|
119 | } else { |
|
120 | return $this->request[$value]; |
|
121 | } |
|
122 | } |
|
123 | ||
124 | private $payload; |
|
125 |