Total Complexity | 9 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Coverage | 33.33% |
Changes | 0 |
1 | <?php |
||
10 | class FilterEvent extends AbstractEvent |
||
11 | { |
||
12 | /** |
||
13 | * @var FilterInterface[] |
||
14 | */ |
||
15 | private $filters = []; |
||
16 | |||
17 | /** |
||
18 | * @var FormInterface[] |
||
19 | */ |
||
20 | private $forms = []; |
||
21 | |||
22 | /** |
||
23 | * @throws Exception |
||
24 | */ |
||
25 | public function addForm(FormInterface $form, string $identifier): void |
||
31 | } |
||
32 | |||
33 | public function removeForm(string $identifier): void |
||
39 | } |
||
40 | |||
41 | public function hasForm(string $identifier): bool |
||
42 | { |
||
43 | return array_key_exists($identifier, $this->forms); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return FormInterface[] |
||
48 | */ |
||
49 | public function getForms() |
||
50 | { |
||
51 | return $this->forms; |
||
52 | 8 | } |
|
53 | |||
54 | 8 | /** |
|
55 | * Add a filter and its value. |
||
56 | */ |
||
57 | public function addFilter(FilterInterface $filter): void |
||
58 | { |
||
59 | $this->filters[] = $filter; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Remove all added filters. |
||
64 | */ |
||
65 | public function clearFilters(): void |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return FilterInterface[] |
||
72 | */ |
||
73 | public function getFilters(): array |
||
76 | } |
||
77 | } |
||
78 |