1 | <?php |
||
11 | class Filter |
||
12 | { |
||
13 | /** @var string */ |
||
14 | protected $filterClass; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $property; |
||
18 | |||
19 | public function __construct(string $property, $filterClass) |
||
24 | |||
25 | public function filter(Builder $builder, $value) |
||
31 | |||
32 | public static function exact(string $property) : self |
||
36 | |||
37 | public static function partial(string $property) : self |
||
41 | |||
42 | public static function scope(string $property) : self |
||
46 | |||
47 | public static function custom(string $property, $filterClass) : self |
||
51 | |||
52 | public function getProperty(): string |
||
56 | |||
57 | public function isForProperty(string $property): bool |
||
61 | |||
62 | private function resolveFilterClass(): CustomFilter |
||
70 | } |
||
71 |