1 | <?php |
||
17 | class Search |
||
18 | { |
||
19 | /** @var string|\Spatie\QueryBuilder\Searches\Search */ |
||
20 | protected $searchClass; |
||
21 | |||
22 | /** @var string */ |
||
23 | protected $property; |
||
24 | |||
25 | /** @var string */ |
||
26 | protected $columnName; |
||
27 | |||
28 | /** @var Collection */ |
||
29 | protected $ignored; |
||
30 | |||
31 | public function __construct(string $property, $searchClass, ?string $columnName = null) |
||
41 | |||
42 | public function search(Builder $builder, $value, $modifier = null) |
||
54 | |||
55 | public static function begins(string $property, ?string $columnName = null): self |
||
59 | |||
60 | public static function ends(string $property, ?string $columnName = null): self |
||
64 | |||
65 | public static function exact(string $property, ?string $columnName = null): self |
||
69 | |||
70 | public static function partial(string $property, $columnName = null): self |
||
74 | |||
75 | public static function split(string $property, $columnName = null): self |
||
79 | |||
80 | public static function splitBegins(string $property, ?string $columnName = null): self |
||
84 | |||
85 | public static function splitEnds(string $property, ?string $columnName = null): self |
||
89 | |||
90 | public static function resolver(string $property, $columnName = null): self |
||
94 | |||
95 | public static function custom(string $property, $searchClass, $columnName = null): self |
||
99 | |||
100 | public function getProperty(): string |
||
104 | |||
105 | public function isForProperty(string $property): bool |
||
109 | |||
110 | public function ignore(...$values): self |
||
118 | |||
119 | public function getIgnored(): array |
||
123 | |||
124 | public function getColumnName(): string |
||
128 | |||
129 | private function resolveSearchClass(): CustomSearch |
||
137 | |||
138 | private function resolveValueForSearching($property) |
||
148 | } |
||
149 |