1 | <?php |
||
8 | abstract class Filter implements FilterInterface |
||
9 | { |
||
10 | protected $type; |
||
11 | |||
12 | protected $value; |
||
13 | |||
14 | protected $name; |
||
15 | |||
16 | protected $title; |
||
17 | |||
18 | protected $defaultValue; |
||
19 | |||
20 | protected $operator = '='; |
||
21 | |||
22 | /** |
||
23 | * Apply filter to the query. |
||
24 | * |
||
25 | * @param Builder $query |
||
26 | */ |
||
27 | public function apply(Builder $query) |
||
31 | |||
32 | public function __construct($name, $title) |
||
36 | |||
37 | public function initialize() |
||
45 | |||
46 | protected function getRequestInputValue() |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function getValue() |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function getViewValue() |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function setValue($value) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function getName() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function setName($name) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function getTitle() |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function setTitle($title) |
||
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | public function getDefaultValue() |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | public function setDefaultValue($defaultValue) |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function getOperator() |
||
143 | |||
144 | /** |
||
145 | * {@inheritdoc} |
||
146 | */ |
||
147 | public function setOperator(string $operator) |
||
153 | |||
154 | public function isActive() |
||
158 | |||
159 | public function toArray() |
||
167 | |||
168 | public function jsonSerialize() |
||
172 | |||
173 | public function toJson($options = 0) |
||
177 | |||
178 | public function __toString() |
||
182 | } |
||
183 |