|
@@ 162-168 (lines=7) @@
|
| 159 |
|
* @param mixed $default Default value to use if key not found |
| 160 |
|
* @return mixed Returns null if key does not exist |
| 161 |
|
*/ |
| 162 |
|
public function getPost($key = null, $default = null) { |
| 163 |
|
if (null === $key) { |
| 164 |
|
return $this->POST; |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
return (isset($this->POST[$key])) ? $this->POST[$key] : $default; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
/** |
| 171 |
|
* Retrieve a member of the $_SERVER superglobal |
|
@@ 179-185 (lines=7) @@
|
| 176 |
|
* @param mixed $default Default value to use if key not found |
| 177 |
|
* @return mixed Returns null if key does not exist |
| 178 |
|
*/ |
| 179 |
|
public function getServer($key = null, $default = null) { |
| 180 |
|
if (null === $key) { |
| 181 |
|
return $this->SERVER; |
| 182 |
|
} |
| 183 |
|
|
| 184 |
|
return (isset($this->SERVER[$key])) ? $this->SERVER[$key] : $default; |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
/** |
| 188 |
|
* Retrieve a member of the $_ENV superglobal |
|
@@ 196-202 (lines=7) @@
|
| 193 |
|
* @param mixed $default Default value to use if key not found |
| 194 |
|
* @return mixed Returns null if key does not exist |
| 195 |
|
*/ |
| 196 |
|
public function getEnv($key = null, $default = null) { |
| 197 |
|
if (null === $key) { |
| 198 |
|
return $this->ENV; |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
return (isset($this->ENV[$key])) ? $this->ENV[$key] : $default; |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
/** |
| 205 |
|
* Return the value of the given HTTP header. Pass the header name as the |