1 | <?php |
||
7 | final class CompositeFilter extends Filter |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $field; |
||
13 | |||
14 | /** |
||
15 | * @var Filter[] |
||
16 | */ |
||
17 | private $filters = []; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $satisfiedBy; |
||
23 | |||
24 | /** |
||
25 | * CompositeFilter constructor. |
||
26 | * @param string $field |
||
27 | * @param array $filters |
||
28 | * @param string $satisfiedBy |
||
29 | * @throws \InvalidArgumentException |
||
30 | */ |
||
31 | public function __construct(string $field, array $filters, string $satisfiedBy = self::SATISFIED_BY_ALL) |
||
47 | |||
48 | /** |
||
49 | * @inheritDoc |
||
50 | */ |
||
51 | public function getField(): string |
||
55 | |||
56 | /** |
||
57 | * @return Filter[] |
||
58 | */ |
||
59 | public function getFilters(): array |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getSatisfiedBy(): string |
||
71 | |||
72 | /** |
||
73 | * @inheritDoc |
||
74 | */ |
||
75 | public function count(): int |
||
79 | |||
80 | /** |
||
81 | * @inheritDoc |
||
82 | */ |
||
83 | public function getType(): string |
||
87 | |||
88 | /** |
||
89 | * @inheritDoc |
||
90 | */ |
||
91 | public function jsonSerialize(): array |
||
110 | } |
||
111 |