1 | <?php |
||
8 | final class FilterValue implements \JsonSerializable |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $key; |
||
14 | |||
15 | /** |
||
16 | * @var mixed |
||
17 | */ |
||
18 | private $value; |
||
19 | |||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | private $applied; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $count; |
||
29 | |||
30 | /** |
||
31 | * @var UriInterface |
||
32 | */ |
||
33 | private $toggleUri; |
||
34 | |||
35 | /** |
||
36 | * FilterValue constructor. |
||
37 | */ |
||
38 | public function __construct(string $key, $value = null, bool $applied = true, ?int $count = null, ?UriInterface $toggleUri = null) |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getKey(): string |
||
54 | |||
55 | /** |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function getValue() |
||
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | public function isApplied(): bool |
||
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | public function getCount(): ?int |
||
78 | |||
79 | /** |
||
80 | * @return UriInterface |
||
81 | */ |
||
82 | public function getToggleUri(): ?UriInterface |
||
86 | |||
87 | /** |
||
88 | * @param bool $applied |
||
89 | */ |
||
90 | public function setApplied(bool $applied): void |
||
94 | |||
95 | /** |
||
96 | * @param int $count |
||
97 | */ |
||
98 | public function setCount(int $count): void |
||
102 | |||
103 | /** |
||
104 | * @param UriInterface $toggleUri |
||
105 | */ |
||
106 | public function setToggleUri(UriInterface $toggleUri): void |
||
110 | |||
111 | /** |
||
112 | * @inheritDoc |
||
113 | */ |
||
114 | public function jsonSerialize() |
||
131 | } |
||
132 |