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 | /** |
||
21 | * Apply filter to the query. |
||
22 | * |
||
23 | * @param Builder $query |
||
24 | */ |
||
25 | public function apply(Builder $query) |
||
29 | |||
30 | public function __construct($name, $title) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function getValue() |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function setValue($value) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getName() |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function setName($name) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getTitle() |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function setTitle($title) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getDefaultValue() |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function setDefaultValue($defaultValue) |
||
109 | |||
110 | public function isActive() |
||
114 | |||
115 | public function toArray() |
||
123 | |||
124 | public function jsonSerialize() |
||
128 | |||
129 | public function toJson($options = 0) |
||
133 | |||
134 | public function __toString() |
||
138 | } |
||
139 |