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 | 9 | public function isEmpty() |
|
62 | |||
63 | /** |
||
64 | * @param array|null $filterData |
||
65 | */ |
||
66 | 163 | public function setFilterData($filterData) |
|
70 | |||
71 | /** |
||
72 | * @return array|null |
||
73 | */ |
||
74 | 5 | public function getFilterData() |
|
78 | |||
79 | /** |
||
80 | * @return bool |
||
81 | */ |
||
82 | 14 | public function allowedNotSet() |
|
86 | |||
87 | /** |
||
88 | * @param mixed $value |
||
89 | * @return mixed |
||
90 | */ |
||
91 | abstract public function filter($value); |
||
92 | } |
||
93 |