1 | <?php |
||
20 | abstract class JSONBackend |
||
21 | { |
||
22 | use Configurable; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $operand; |
||
28 | |||
29 | /** |
||
30 | * @var JSONText |
||
31 | */ |
||
32 | protected $jsonText; |
||
33 | |||
34 | /** |
||
35 | * JSONBackend constructor. |
||
36 | * |
||
37 | * @param string $operand |
||
38 | * @param JSONText $jsonText |
||
39 | */ |
||
40 | public function __construct($operand, $jsonText) |
||
41 | { |
||
42 | $this->operand = $operand; |
||
43 | $this->jsonText = $jsonText; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Match on keys by INT. If >1 matches are found, an indexed array of all matches is returned. |
||
48 | * |
||
49 | * @return array |
||
50 | * @throws JSONTextInvalidArgsException |
||
51 | */ |
||
52 | abstract public function matchOnInt(); |
||
53 | |||
54 | /** |
||
55 | * Match on keys by STRING. If >1 matches are found, an indexed array of all matches is returned. |
||
56 | * |
||
57 | * @return array |
||
58 | * @throws JSONTextInvalidArgsException |
||
59 | */ |
||
60 | abstract public function matchOnStr(); |
||
61 | |||
62 | /** |
||
63 | * Match on RDBMS-specific path operator. If >1 matches are found, an indexed array of all matches is returned. |
||
64 | * |
||
65 | * @return array |
||
66 | * @throws JSONTextException |
||
67 | */ |
||
68 | abstract public function matchOnPath(); |
||
69 | |||
70 | /** |
||
71 | * Match on JSONPath expression. If >1 matches are found, an indexed array of all matches is returned. |
||
72 | * |
||
73 | * @return array |
||
74 | * @throws JSONTextInvalidArgsException |
||
75 | */ |
||
76 | public function matchOnExpr() |
||
92 | |||
93 | } |
||
94 |