[TASK] Streamline phpdoc annotations in EXT:extbase
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / ComparisonInterface.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 * Filters node-tuples based on the outcome of a binary operation.
19 *
20 * For any comparison, operand2 always evaluates to a scalar value. In contrast,
21 * operand1 may evaluate to an array of values (for example, the value of a multi-valued
22 * property), in which case the comparison is separately performed for each element
23 * of the array, and the Comparison constraint is satisfied as a whole if the
24 * comparison against any element of the array is satisfied.
25 *
26 * If operand1 and operand2 evaluate to values of different property types, the
27 * value of operand2 is converted to the property type of the value of operand1.
28 * If the type conversion fails, the query is invalid.
29 *
30 * If operator is not supported for the property type of operand1, the query is invalid.
31 *
32 * If operand1 evaluates to null (for example, if the operand evaluates the value
33 * of a property which does not exist), the constraint is not satisfied.
34 *
35 * The JCR_OPERATOR_EQUAL_TO operator is satisfied only if the value of operand1
36 * equals the value of operand2.
37 *
38 * The JCR_OPERATOR_NOT_EQUAL_TO operator is satisfied unless the value of
39 * operand1 equals the value of operand2.
40 *
41 * The JCR_OPERATOR_LESSS_THAN operator is satisfied only if the value of
42 * operand1 is ordered before the value of operand2.
43 *
44 * The JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO operator is satisfied unless the value
45 * of operand1 is ordered after the value of operand2.
46 *
47 * The JCR_OPERATOR_GREATER_THAN operator is satisfied only if the value of
48 * operand1 is ordered after the value of operand2.
49 *
50 * The JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO operator is satisfied unless the
51 * value of operand1 is ordered before the value of operand2.
52 *
53 * The JCR_OPERATOR_LIKE operator is satisfied only if the value of operand1
54 * matches the pattern specified by the value of operand2, where in the pattern:
55 * the character "%" matches zero or more characters, and
56 * the character "_" (underscore) matches exactly one character, and
57 * the string "\x" matches the character "x", and
58 * all other characters match themselves.
59 */
60 interface ComparisonInterface extends ConstraintInterface
61 {
62 /**
63 * Gets the first operand.
64 *
65 * @return PropertyValueInterface the operand; non-null
66 */
67 public function getOperand1();
68
69 /**
70 * Gets the operator.
71 *
72 * @return string one of \TYPO3\CMS\Extbase\Persistence\QueryInterface::*
73 */
74 public function getOperator();
75
76 /**
77 * Gets the second operand.
78 *
79 * @return StaticOperandInterface the operand; non-null
80 */
81 public function getOperand2();
82 }