| 1 | <?php |
||
| 16 | class OrderBy |
||
| 17 | { |
||
| 18 | const ASC = 'ASC'; |
||
| 19 | const DESC = 'DESC'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var Column |
||
| 23 | */ |
||
| 24 | protected $column; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $direction; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var bool |
||
| 33 | */ |
||
| 34 | protected $useAlias; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param Column $column |
||
| 38 | * @param string $direction |
||
| 39 | */ |
||
| 40 | public function __construct(Column $column, $direction) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return Column |
||
| 48 | */ |
||
| 49 | public function getColumn() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param Column $column |
||
| 56 | * |
||
| 57 | * @return $this |
||
| 58 | */ |
||
| 59 | public function setColumn($column) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | public function getDirection() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param string $direction |
||
| 76 | * |
||
| 77 | * @throws \InvalidArgumentException |
||
| 78 | * |
||
| 79 | * @return $this |
||
| 80 | */ |
||
| 81 | public function setDirection($direction) |
||
| 92 | } |
||
| 93 |