1 | <?php |
||
12 | class OrderBy extends AbstractSpecification |
||
13 | { |
||
14 | const ASC = 'ASC'; |
||
15 | const DESC = 'DESC'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $order; |
||
21 | |||
22 | private static $validOrder = [self::ASC, self::DESC]; |
||
23 | |||
24 | /** |
||
25 | * @param string $field |
||
26 | * @param string $order |
||
27 | * @param string|null $dqlAlias |
||
28 | * |
||
29 | * @throws InvalidArgumentException |
||
30 | */ |
||
31 | public function __construct($field, $order = null, $dqlAlias = null) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function modify(QueryBuilder $queryBuilder, $dqlAlias) |
||
54 | } |
||
55 |