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) |
||
39 | |||
40 | protected function buildQuery(Builder $query, $name) |
||
59 | |||
60 | public function __construct($name, $title) |
||
64 | |||
65 | public function initialize() |
||
73 | |||
74 | protected function getRequestInputValue() |
||
79 | |||
80 | protected function getRequestName() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function getValue() |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function getViewValue() |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function setValue($value) |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function getName() |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function setName($name) |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function getTitle() |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function setTitle($title) |
||
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | public function getDefaultValue() |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | public function setDefaultValue($defaultValue) |
||
168 | |||
169 | /** |
||
170 | * {@inheritdoc} |
||
171 | */ |
||
172 | public function getOperator() |
||
176 | |||
177 | /** |
||
178 | * {@inheritdoc} |
||
179 | */ |
||
180 | public function setOperator(string $operator) |
||
186 | |||
187 | public function isActive() |
||
191 | |||
192 | public function toArray() |
||
200 | |||
201 | public function jsonSerialize() |
||
205 | |||
206 | public function toJson($options = 0) |
||
210 | |||
211 | public function __toString() |
||
215 | } |
||
216 |