[TASK] Namespace classes
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / LogicalNot.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
8 * All rights reserved
9 *
10 * This class is a backport of the corresponding class of FLOW3.
11 * All credits go to the v5 team.
12 *
13 * This script is part of the TYPO3 project. The TYPO3 project is
14 * free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * The GNU General Public License can be found at
20 * http://www.gnu.org/copyleft/gpl.html.
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * Performs a logical negation of another constraint.
31 *
32 * To satisfy the Not constraint, the node-tuple must not satisfy constraint.
33 *
34 * @package Extbase
35 * @subpackage Persistence\QOM
36 * @version $Id$
37 * @scope prototype
38 */
39 class LogicalNot implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\NotInterface {
40
41 /**
42 * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface
43 */
44 protected $constraint;
45
46 /**
47 * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint
48 */
49 public function __construct(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint) {
50 $this->constraint = $constraint;
51 }
52
53 /**
54 * Fills an array with the names of all bound variables in the constraint
55 *
56 * @param array &$boundVariables
57 * @return void
58 */
59 public function collectBoundVariableNames(&$boundVariables) {
60 $this->constraint->collectBoundVariableNames($boundVariables);
61 }
62
63 /**
64 * Gets the constraint negated by this Not constraint.
65 *
66 * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface the constraint; non-null
67 */
68 public function getConstraint() {
69 return $this->constraint;
70 }
71
72 }
73
74
75 ?>