1 | <?php |
||
7 | class JsonBody extends Body |
||
8 | { |
||
9 | /** |
||
10 | * @var JsonObject |
||
11 | */ |
||
12 | private $json = []; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $jsonString = ''; |
||
18 | |||
19 | /** |
||
20 | * @param string $jsonString |
||
21 | */ |
||
22 | public function __construct($jsonString) |
||
27 | |||
28 | /** |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function isJson(): bool |
||
35 | |||
36 | /** |
||
37 | * @param string $selector |
||
38 | * @return \Kartenmacherei\RestFramework\JsonArray|JsonObject |
||
39 | */ |
||
40 | public function query(string $selector) |
||
44 | |||
45 | /** |
||
46 | * @return JsonObject |
||
47 | */ |
||
48 | public function getJson(): JsonObject |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getEncodedString(): string |
||
60 | |||
61 | /** |
||
62 | * @param string $jsonString |
||
63 | * @return JsonObject |
||
64 | * @throws EnsureException |
||
65 | */ |
||
66 | private function decode(string $jsonString): JsonObject |
||
74 | |||
75 | } |
||
76 |