1 | <?php |
||
7 | abstract class Filter implements \JsonSerializable |
||
8 | { |
||
9 | public const SATISFIED_BY_ANY = 'ANY'; |
||
10 | public const SATISFIED_BY_ALL = 'ALL'; |
||
11 | |||
12 | /** |
||
13 | * @var bool |
||
14 | */ |
||
15 | private $applied = true; |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | private $negated = false; |
||
21 | |||
22 | /** |
||
23 | * @var UriInterface |
||
24 | */ |
||
25 | private $toggleUri; |
||
26 | |||
27 | /** |
||
28 | * @return bool |
||
29 | */ |
||
30 | public function isApplied(): bool |
||
34 | |||
35 | /** |
||
36 | * @param bool $applied |
||
37 | */ |
||
38 | public function setApplied(bool $applied): void |
||
42 | |||
43 | /** |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function isNegated(): bool |
||
50 | |||
51 | /** |
||
52 | * @return Filter |
||
53 | */ |
||
54 | public function negate(): Filter |
||
60 | |||
61 | /** |
||
62 | * @return UriInterface |
||
63 | */ |
||
64 | public function getToggleUri(): ?UriInterface |
||
68 | |||
69 | /** |
||
70 | * @param UriInterface $toggleUri |
||
71 | */ |
||
72 | public function setToggleUri(UriInterface $toggleUri): void |
||
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | abstract public function getField(): string; |
||
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | abstract public function getType(): string; |
||
86 | |||
87 | /** |
||
88 | * @inheritDoc |
||
89 | */ |
||
90 | abstract public function jsonSerialize(): array; |
||
91 | } |
||
92 |