1 | <?php |
||
9 | class Sort |
||
10 | { |
||
11 | /** @var string */ |
||
12 | protected $sortClass; |
||
13 | |||
14 | /** @var string */ |
||
15 | protected $property; |
||
16 | |||
17 | public function __construct(string $property, $sortClass) |
||
22 | |||
23 | public function sort(Builder $builder, $descending) |
||
29 | |||
30 | public static function field(string $property) : self |
||
34 | |||
35 | public static function custom(string $property, $sortClass) : self |
||
39 | |||
40 | public function getProperty(): string |
||
44 | |||
45 | public function isForProperty(string $property): bool |
||
49 | |||
50 | private function resolveSortClass(): CustomSort |
||
58 | } |
||
59 |