1 | <?php |
||
17 | class JSONBackend |
||
18 | { |
||
19 | /** |
||
20 | * @var mixed |
||
21 | */ |
||
22 | protected $key; |
||
23 | |||
24 | /** |
||
25 | * @var mixed |
||
26 | */ |
||
27 | protected $val; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $idx; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $operand; |
||
38 | |||
39 | /** |
||
40 | * @var JSONText |
||
41 | */ |
||
42 | protected $jsonText; |
||
43 | |||
44 | /** |
||
45 | * JSONBackend constructor. |
||
46 | * |
||
47 | * @param mixed $key |
||
48 | * @param mixed $val |
||
49 | * @param int $idx |
||
50 | * @param string $operand |
||
51 | * @param JSONText $jsonText |
||
52 | */ |
||
53 | public function __construct($key, $val, $idx, $operand, $jsonText) |
||
61 | |||
62 | /** |
||
63 | * Match on keys by INT. |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | public function matchIfKeyIsInt() |
||
75 | |||
76 | /** |
||
77 | * Match on keys by STRING. |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | public function matchIfKeyIsStr() |
||
90 | |||
91 | /** |
||
92 | * Match on path. If >1 matches are found, an indexed array of all matches is returned. |
||
93 | * |
||
94 | * @return array |
||
95 | * @throws \JSONText\Exceptions\JSONTextException |
||
96 | */ |
||
97 | public function matchOnPath() |
||
137 | |||
138 | } |
||
139 |