1 | <?php |
||
7 | class Filter |
||
8 | { |
||
9 | private $fromColumn; |
||
10 | private $toColumn; |
||
11 | private $fromDate; |
||
12 | private $toDate; |
||
13 | |||
14 | 6 | private function __construct(array $filters) |
|
21 | |||
22 | 6 | public static function createFromArray(array $filters) :Filter |
|
26 | |||
27 | 5 | public function isFromColumnEnabled() :bool |
|
31 | |||
32 | 2 | public function isToColumnEnabled() :bool |
|
36 | |||
37 | 4 | public function isFromDateEnabled() :bool |
|
41 | |||
42 | 4 | public function isToDateEnabled() :bool |
|
46 | |||
47 | /** |
||
48 | * @return string|null |
||
49 | */ |
||
50 | 1 | public function getFromColumn(): ?string |
|
54 | |||
55 | /** |
||
56 | * @return string|null |
||
57 | */ |
||
58 | 1 | public function getToColumn(): ?string |
|
62 | |||
63 | /** |
||
64 | * @return string|null |
||
65 | */ |
||
66 | 1 | public function getFromDate(): ?string |
|
70 | |||
71 | /** |
||
72 | * @return string|null |
||
73 | */ |
||
74 | 1 | public function getToDate(): ?string |
|
78 | } |