1 | <?php |
||
8 | class Json extends Http |
||
9 | { |
||
10 | private $json; |
||
11 | |||
12 | /** |
||
13 | * Transform request json body to array |
||
14 | * @return array |
||
15 | */ |
||
16 | 2 | private function getJson() |
|
20 | |||
21 | /** |
||
22 | * Retrieve content of the request - do not use |
||
23 | * @codeCoverageIgnore |
||
24 | * @return string|null |
||
25 | */ |
||
26 | protected function getRequestContent() |
||
30 | |||
31 | /** |
||
32 | * Return requested value in Json structure |
||
33 | * @param string $name Name to retrieve |
||
34 | * @param mixed $defaultValue Value returned if name is not defined in query |
||
35 | * @return mixed |
||
36 | */ |
||
37 | 1 | public function get($name, $defaultValue = null) |
|
41 | |||
42 | /** |
||
43 | * Check if a parameter name exists |
||
44 | * @param string $name |
||
45 | * @return bool |
||
46 | */ |
||
47 | 2 | public function has($name) |
|
51 | } |
||
52 |