1 | <?php |
||
7 | final class RangeFilter extends Filter |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $field; |
||
13 | private $left; |
||
14 | private $right; |
||
15 | |||
16 | /** |
||
17 | * RangeFilter constructor. |
||
18 | * @param string $field |
||
19 | * @param $left |
||
20 | * @param $right |
||
21 | */ |
||
22 | public function __construct(string $field, $left = null, $right = null) |
||
28 | |||
29 | /** |
||
30 | * @inheritDoc |
||
31 | */ |
||
32 | public function getField(): string |
||
36 | |||
37 | /** |
||
38 | * @inheritDoc |
||
39 | */ |
||
40 | public function getLeft() |
||
44 | |||
45 | /** |
||
46 | * @inheritDoc |
||
47 | */ |
||
48 | public function getRight() |
||
52 | |||
53 | /** |
||
54 | * @inheritDoc |
||
55 | */ |
||
56 | public function isInRange($value): bool |
||
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | public function getType(): string |
||
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | public function jsonSerialize(): array |
||
92 | } |
||
93 |