1 | <?php |
||
19 | abstract class JSONBackend |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $operand; |
||
26 | |||
27 | /** |
||
28 | * @var JSONText |
||
29 | */ |
||
30 | protected $jsonText; |
||
31 | |||
32 | /** |
||
33 | * JSONBackend constructor. |
||
34 | * |
||
35 | * @param string $operand |
||
36 | * @param JSONText $jsonText |
||
37 | */ |
||
38 | public function __construct($operand, $jsonText) |
||
43 | |||
44 | /** |
||
45 | * Match on keys by INT. If >1 matches are found, an indexed array of all matches is returned. |
||
46 | * |
||
47 | * @return array |
||
48 | * @throws JSONTextException |
||
49 | */ |
||
50 | abstract public function matchOnInt(); |
||
51 | |||
52 | /** |
||
53 | * Match on keys by STRING. If >1 matches are found, an indexed array of all matches is returned. |
||
54 | * |
||
55 | * @return array |
||
56 | * @throws JSONTextException |
||
57 | */ |
||
58 | abstract function matchOnStr(); |
||
59 | |||
60 | /** |
||
61 | * Match on RDBMS-specific path operator. If >1 matches are found, an indexed array of all matches is returned. |
||
62 | * |
||
63 | * @return array |
||
64 | * @throws \JSONText\Exceptions\JSONTextException |
||
65 | */ |
||
66 | abstract public function matchOnPath(); |
||
67 | |||
68 | /** |
||
69 | * Match on JSONPath expression. If >1 matches are found, an indexed array of all matches is returned. |
||
70 | * |
||
71 | * @return array |
||
72 | * @throws JSONTextException |
||
73 | */ |
||
74 | public function matchOnExpr() |
||
90 | |||
91 | } |
||
92 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.