‪TYPO3CMS  ‪main
QueryObjectModelFactory.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
23 
30 {
39  public function ‪selector($nodeTypeName, $selectorName = '')
40  {
41  if ($selectorName === '') {
42  $selectorName = $nodeTypeName;
43  }
44  return GeneralUtility::makeInstance(Selector::class, $selectorName, $nodeTypeName);
45  }
46 
54  public function ‪statement($statement, array $boundVariables = [])
55  {
56  return GeneralUtility::makeInstance(Statement::class, $statement, $boundVariables);
57  }
58 
67  public function ‪join(‪SourceInterface $left, ‪SourceInterface $right, $joinType, ‪JoinConditionInterface $joinCondition)
68  {
69  return GeneralUtility::makeInstance(Join::class, $left, $right, $joinType, $joinCondition);
70  }
71 
82  public function ‪equiJoinCondition($selector1Name, $property1Name, $selector2Name, $property2Name)
83  {
84  return GeneralUtility::makeInstance(EquiJoinCondition::class, $selector1Name, $property1Name, $selector2Name, $property2Name);
85  }
86 
95  public function ‪_and(‪ConstraintInterface $constraint1, ‪ConstraintInterface $constraint2)
96  {
97  return GeneralUtility::makeInstance(LogicalAnd::class, $constraint1, $constraint2);
98  }
99 
108  public function ‪_or(‪ConstraintInterface $constraint1, ‪ConstraintInterface $constraint2)
109  {
110  return GeneralUtility::makeInstance(LogicalOr::class, $constraint1, $constraint2);
111  }
112 
120  public function ‪not(‪ConstraintInterface $constraint)
121  {
122  return GeneralUtility::makeInstance(LogicalNot::class, $constraint);
123  }
124 
134  public function ‪comparison(‪PropertyValueInterface $operand1, int $operator, $operand2)
135  {
136  return GeneralUtility::makeInstance(Comparison::class, $operand1, $operator, $operand2);
137  }
138 
147  public function ‪propertyValue($propertyName, $selectorName = '')
148  {
149  return GeneralUtility::makeInstance(PropertyValue::class, $propertyName, $selectorName);
150  }
151 
159  public function ‪lowerCase(‪PropertyValueInterface $operand)
160  {
161  return GeneralUtility::makeInstance(LowerCase::class, $operand);
162  }
163 
171  public function ‪upperCase(‪PropertyValueInterface $operand)
172  {
173  return GeneralUtility::makeInstance(UpperCase::class, $operand);
174  }
175 
185  public function ‪ascending(‪DynamicOperandInterface $operand)
186  {
187  return GeneralUtility::makeInstance(Ordering::class, $operand, ‪QueryInterface::ORDER_ASCENDING);
188  }
189 
199  public function ‪descending(‪DynamicOperandInterface $operand)
200  {
201  return GeneralUtility::makeInstance(Ordering::class, $operand, ‪QueryInterface::ORDER_DESCENDING);
202  }
203 
211  public function ‪bindVariable($bindVariableName)
212  {
213  return GeneralUtility::makeInstance(BindVariableValue::class, $bindVariableName);
214  }
215 }
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\ascending
‪OrderingInterface ascending(DynamicOperandInterface $operand)
Definition: QueryObjectModelFactory.php:185
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\BindVariableValueInterface
Definition: BindVariableValueInterface.php:24
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\selector
‪TYPO3 CMS Extbase Persistence Generic Qom SelectorInterface selector($nodeTypeName, $selectorName='')
Definition: QueryObjectModelFactory.php:39
‪TYPO3\CMS\Extbase\Persistence\QueryInterface
Definition: QueryInterface.php:30
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\propertyValue
‪TYPO3 CMS Extbase Persistence Generic Qom PropertyValueInterface propertyValue($propertyName, $selectorName='')
Definition: QueryObjectModelFactory.php:147
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\OrderingInterface
Definition: OrderingInterface.php:25
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\_and
‪TYPO3 CMS Extbase Persistence Generic Qom AndInterface _and(ConstraintInterface $constraint1, ConstraintInterface $constraint2)
Definition: QueryObjectModelFactory.php:95
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_DESCENDING
‪const ORDER_DESCENDING
Definition: QueryInterface.php:100
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
Definition: QueryObjectModelFactory.php:30
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface
Definition: SourceInterface.php:23
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\equiJoinCondition
‪TYPO3 CMS Extbase Persistence Generic Qom EquiJoinConditionInterface equiJoinCondition($selector1Name, $property1Name, $selector2Name, $property2Name)
Definition: QueryObjectModelFactory.php:82
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinConditionInterface
Definition: JoinConditionInterface.php:24
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\statement
‪TYPO3 CMS Extbase Persistence Generic Qom Statement statement($statement, array $boundVariables=[])
Definition: QueryObjectModelFactory.php:54
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\PropertyValueInterface
Definition: PropertyValueInterface.php:32
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_ASCENDING
‪const ORDER_ASCENDING
Definition: QueryInterface.php:99
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\bindVariable
‪BindVariableValueInterface bindVariable($bindVariableName)
Definition: QueryObjectModelFactory.php:211
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\join
‪TYPO3 CMS Extbase Persistence Generic Qom JoinInterface join(SourceInterface $left, SourceInterface $right, $joinType, JoinConditionInterface $joinCondition)
Definition: QueryObjectModelFactory.php:67
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\comparison
‪TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface comparison(PropertyValueInterface $operand1, int $operator, $operand2)
Definition: QueryObjectModelFactory.php:134
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\not
‪TYPO3 CMS Extbase Persistence Generic Qom NotInterface not(ConstraintInterface $constraint)
Definition: QueryObjectModelFactory.php:120
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom
Definition: AndInterface.php:16
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\descending
‪OrderingInterface descending(DynamicOperandInterface $operand)
Definition: QueryObjectModelFactory.php:199
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface
Definition: ConstraintInterface.php:27
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface
Definition: DynamicOperandInterface.php:23
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\lowerCase
‪TYPO3 CMS Extbase Persistence Generic Qom LowerCaseInterface lowerCase(PropertyValueInterface $operand)
Definition: QueryObjectModelFactory.php:159
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\_or
‪TYPO3 CMS Extbase Persistence Generic Qom OrInterface _or(ConstraintInterface $constraint1, ConstraintInterface $constraint2)
Definition: QueryObjectModelFactory.php:108
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\upperCase
‪TYPO3 CMS Extbase Persistence Generic Qom UpperCaseInterface upperCase(PropertyValueInterface $operand)
Definition: QueryObjectModelFactory.php:171