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 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function getValue() |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function setValue($value) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function getName() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function setName($name) |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function getTitle() |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function setTitle($title) |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getDefaultValue() |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function setDefaultValue($defaultValue) |
||
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | public function getOperator() |
||
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | public function setOperator(string $operator) |
||
138 | |||
139 | public function isActive() |
||
143 | |||
144 | public function toArray() |
||
152 | |||
153 | public function jsonSerialize() |
||
157 | |||
158 | public function toJson($options = 0) |
||
162 | |||
163 | public function __toString() |
||
167 | } |
||
168 |