[TASK] Re-work/simplify copyright header in PHP files - Part 8
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / Comparison.php
index 0ffa587..93e789e 100644 (file)
@@ -1,32 +1,20 @@
 <?php
 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
 
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010-2013 Extbase Team (http://forge.typo3.org/projects/typo3v4-mvc)
- *  Extbase is a backport of TYPO3 Flow. All credits go to the TYPO3 Flow team.
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the text file GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
+/**
+ * This file is part of the TYPO3 CMS project.
  *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
  *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
  *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
+ * The TYPO3 project - inspiring people to share!
+ */
+use TYPO3\CMS\Extbase\Persistence\QueryInterface;
+
 /**
  * Filters node-tuples based on the outcome of a binary operation.
  *
@@ -70,10 +58,10 @@ namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
  * the string "\x" matches the character "x", and
  * all other characters match themselves.
  */
-class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface {
+class Comparison implements ComparisonInterface {
 
        /**
-        * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface
+        * @var PropertyValueInterface
         */
        protected $operand1;
 
@@ -87,7 +75,7 @@ class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Compariso
         */
        protected $operand2;
 
-       /*
+       /**
         * @var string
         */
        protected $parameterIdentifier;
@@ -95,11 +83,11 @@ class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Compariso
        /**
         * Constructs this Comparison instance
         *
-        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand1
-        * @param integer $operator one of \TYPO3\CMS\Extbase\Persistence\QueryInterface.OPERATOR_*
+        * @param PropertyValueInterface $operand1
+        * @param integer $operator one of QueryInterface::OPERATOR_*
         * @param mixed $operand2
         */
-       public function __construct(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand1, $operator, $operand2) {
+       public function __construct(PropertyValueInterface $operand1, $operator, $operand2) {
                $this->operand1 = $operand1;
                $this->operator = $operator;
                $this->operand2 = $operand2;
@@ -108,7 +96,7 @@ class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Compariso
        /**
         * Gets the first operand.
         *
-        * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface the operand; non-null
+        * @return PropertyValueInterface the operand; non-null
         */
        public function getOperand1() {
                return $this->operand1;
@@ -117,16 +105,16 @@ class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Compariso
        /**
         * Gets the operator.
         *
-        * @return string one of \TYPO3\CMS\Extbase\Persistence\QueryInterface.OPERATOR_*
+        * @return string One of QueryInterface::OPERATOR_*
         */
        public function getOperator() {
                $operator = $this->operator;
 
                if ($this->getOperand2() === NULL) {
-                       if ($operator === \TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_EQUAL_TO) {
-                               $operator = \TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_EQUAL_TO_NULL;
-                       } elseif ($operator === \TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_NOT_EQUAL_TO) {
-                               $operator = \TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_NOT_EQUAL_TO_NULL;
+                       if ($operator === QueryInterface::OPERATOR_EQUAL_TO) {
+                               $operator = QueryInterface::OPERATOR_EQUAL_TO_NULL;
+                       } elseif ($operator === QueryInterface::OPERATOR_NOT_EQUAL_TO) {
+                               $operator = QueryInterface::OPERATOR_NOT_EQUAL_TO_NULL;
                        }
                }
 
@@ -156,4 +144,13 @@ class Comparison implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Compariso
        public function getParameterIdentifier() {
                return $this->parameterIdentifier;
        }
+
+       /**
+        * Fills an array with the names of all bound variables in the constraints
+        *
+        * @param array &$boundVariables
+        * @return void
+        */
+       public function collectBoundVariableNames(&$boundVariables) {
+       }
 }