1 | <?php |
||
14 | abstract class FilterRule |
||
15 | { |
||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | protected $encodingFormat; |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $allowNotSet = false; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | protected $isEmpty = false; |
||
30 | |||
31 | /** |
||
32 | * @var array|null |
||
33 | */ |
||
34 | protected $filterData; |
||
35 | |||
36 | /** |
||
37 | * @param string|null $encodingFormat |
||
38 | */ |
||
39 | 163 | public function setEncodingFormat($encodingFormat) |
|
43 | |||
44 | /** |
||
45 | * Set the value to empty |
||
46 | * |
||
47 | * @return null |
||
48 | */ |
||
49 | 6 | protected function setEmpty() |
|
54 | |||
55 | /** |
||
56 | * @return bool |
||
57 | */ |
||
58 | 160 | public function isNotEmpty() |
|
62 | |||
63 | /** |
||
64 | * @param array|null $filterData |
||
65 | */ |
||
66 | 163 | public function setFilterData($filterData) |
|
73 | |||
74 | /** |
||
75 | * @return array|null |
||
76 | */ |
||
77 | 5 | public function getFilterData() |
|
81 | |||
82 | /** |
||
83 | * @return bool |
||
84 | */ |
||
85 | 14 | public function allowedNotSet() |
|
89 | |||
90 | /** |
||
91 | * @param mixed $value |
||
92 | * @return mixed |
||
93 | */ |
||
94 | abstract public function filter($value); |
||
95 | } |
||
96 |