| 1 | <?php |
||
| 11 | abstract class Orderable |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Will return an orderable configuration that does not allow ordering. |
||
| 15 | * @return NoneOrderable |
||
| 16 | */ |
||
| 17 | public static function NONE() |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Will return an orderable configuration that does allow ordering but only on asc. |
||
| 24 | * @return AscOrderable |
||
| 25 | */ |
||
| 26 | public static function ASC() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Will return an orderable configuration that does allow ordering but only on desc. |
||
| 33 | * @return DescOrderable |
||
| 34 | */ |
||
| 35 | public static function DESC() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Will return an orderable configuration that does allow ordering on both directions. |
||
| 42 | * @return BothOrderable |
||
| 43 | */ |
||
| 44 | public static function BOTH() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Will determine if the current configuration allows ordering. |
||
| 51 | * @return bool True if the column can be ordered, false if not. |
||
| 52 | */ |
||
| 53 | abstract public function isOrderable(); |
||
| 54 | } |