[TASK] Change to named keys in EXT:seo when using generateMetaTags hook
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / Ordering.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Determines the relative order of two rows in the result set by evaluating operand for
19 * each.
20 * @internal only to be used within Extbase, not part of TYPO3 Core API.
21 */
22 class Ordering implements OrderingInterface
23 {
24 /**
25 * @var DynamicOperandInterface
26 */
27 protected $operand;
28
29 /**
30 * @var string One of \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_*
31 */
32 protected $order;
33
34 /**
35 * Constructs the Ordering instance
36 *
37 * @param DynamicOperandInterface $operand The operand; non-null
38 * @param string $order One of \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_*
39 */
40 public function __construct(DynamicOperandInterface $operand, $order = \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
41 {
42 $this->operand = $operand;
43 $this->order = $order;
44 }
45
46 /**
47 * The operand by which to order.
48 *
49 * @return DynamicOperandInterface the operand; non-null
50 */
51 public function getOperand()
52 {
53 return $this->operand;
54 }
55
56 /**
57 * Gets the order.
58 *
59 * @return string One of \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_*
60 */
61 public function getOrder()
62 {
63 return $this->order;
64 }
65 }