‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression Class Reference
Inheritance diagram for TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression:

Public Member Functions

 __construct ($type, array $parts=[])
 
 with ($part=null,... $parts)
 
 count ()
 
 getType ()
 
 __toString ()
 

Static Public Member Functions

static and ($part=null,... $parts)
 
static or ($part=null,... $parts)
 

Private Attributes

array $parts = []
 
string $type
 

Detailed Description

Facade of the Doctrine DBAL CompositeExpression to have all Query related classes with in TYPO3\CMS namespace.

Definition at line 26 of file CompositeExpression.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::__construct (   $type,
array  $parts = [] 
)
Parameters
string$type
string[] | self[]$parts

Use factory methods and() or or() methods instead. Signature will change along with doctrine/dbal 4.

Definition at line 45 of file CompositeExpression.php.

References TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\$parts, and TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\$type.

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::__toString ( )

Retrieves the string representation of this composite expression. If expression is empty, just return an empty string. Native Doctrine expression would return () instead.

Definition at line 126 of file CompositeExpression.php.

References TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\count().

◆ and()

◆ count()

TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::count ( )

Retrieves the amount of expressions on composite expression.

Definition at line 108 of file CompositeExpression.php.

Referenced by TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\__toString().

◆ getType()

TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::getType ( )

Returns the type of this composite expression (AND/OR).

Definition at line 116 of file CompositeExpression.php.

References TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\$type.

◆ or()

static TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::or (   $part = null,
  $parts 
)
static
Parameters
self | string | null$part
self|string|null‪...$parts

Definition at line 75 of file CompositeExpression.php.

References TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\$parts.

Referenced by TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\or().

◆ with()

TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::with (   $part = null,
  $parts 
)

Returns a new CompositeExpression with the given parts added.

Parameters
self | string | null$part
self|string|null‪...$parts

Definition at line 88 of file CompositeExpression.php.

References TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression\$parts.

Member Data Documentation

◆ $parts

◆ $type

string TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression::$type
private