1 | <?php |
||
11 | |||
12 | namespace JSONText\Backends; |
||
13 | |||
14 | use JSONText\Exceptions\JSONTextException; |
||
15 | use JSONText\Fields\JSONText; |
||
16 | |||
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 | * Not used. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $operator; |
||
45 | |||
46 | /** |
||
47 | * @var JSONText |
||
48 | */ |
||
49 | protected $jsonText; |
||
50 | |||
51 | /** |
||
52 | * PostgresJSONBackend constructor. |
||
53 | * |
||
54 | * @param mixed $key |
||
55 | * @param mixed $val |
||
56 | * @param int $idx |
||
57 | * @param string $operand |
||
58 | * @param JSONText $jsonText |
||
59 | */ |
||
60 | public function __construct($key, $val, $idx, $operator, $operand, $jsonText) |
||
69 | |||
70 | /** |
||
71 | * Match on keys by INT. |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | public function matchIfKeyIsInt() |
||
83 | |||
84 | /** |
||
85 | * Match on keys by STRING. |
||
86 | * |
||
87 | * @return array |
||
139 |