![]() |
TYPO3
7.6
|
Public Attributes | |
const | JCR_JOIN_TYPE_INNER = '{http://www.jcp.org/jcr/1.0}joinTypeInner' |
const | JCR_JOIN_TYPE_LEFT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeLeftOuter' |
const | JCR_JOIN_TYPE_RIGHT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeRightOuter' |
const | CHARSET = 'utf-8' |
![]() | |
const | OPERATOR_EQUAL_TO = 1 |
const | OPERATOR_EQUAL_TO_NULL = 101 |
const | OPERATOR_NOT_EQUAL_TO = 2 |
const | OPERATOR_NOT_EQUAL_TO_NULL = 202 |
const | OPERATOR_LESS_THAN = 3 |
const | OPERATOR_LESS_THAN_OR_EQUAL_TO = 4 |
const | OPERATOR_GREATER_THAN = 5 |
const | OPERATOR_GREATER_THAN_OR_EQUAL_TO = 6 |
const | OPERATOR_LIKE = 7 |
const | OPERATOR_CONTAINS = 8 |
const | OPERATOR_IN = 9 |
const | OPERATOR_IS_NULL = 10 |
const | OPERATOR_IS_EMPTY = 11 |
const | ORDER_ASCENDING = 'ASC' |
const | ORDER_DESCENDING = 'DESC' |
Protected Member Functions | |
getSelectorName () | |
Protected Attributes | |
$type | |
$objectManager | |
$dataMapper | |
$persistenceManager | |
$qomFactory | |
$source | |
$constraint | |
$statement | |
$orderings = array() | |
$limit | |
$offset | |
$querySettings | |
__construct | ( | $type | ) |
Constructs a query object working on the given class name
string | $type |
Definition at line 146 of file Query.php.
References Query\$type.
between | ( | $propertyName, | |
$operandLower, | |||
$operandUpper | |||
) |
Returns a greater than or equal criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
$operandLower | The value of the lower boundary to compare against | |
$operandUpper | The value of the upper boundary to compare against |
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidNumberOfConstraintsException |
Definition at line 599 of file Query.php.
References Query\greaterThanOrEqual(), Query\lessThanOrEqual(), and Query\logicalAnd().
contains | ( | $propertyName, | |
$operand | |||
) |
Returns a "contains" criterion used for matching objects against a query. It matches if the multivalued property contains the given operand.
string | $propertyName | The name of the (multivalued) property to compare against |
mixed | $operand | The value to compare with |
Implements QueryInterface.
Definition at line 514 of file Query.php.
References QueryInterface\OPERATOR_CONTAINS.
count | ( | ) |
Returns the query result count.
Implements QueryInterface.
Definition at line 632 of file Query.php.
References Query\execute().
equals | ( | $propertyName, | |
$operand, | |||
$caseSensitive = true |
|||
) |
Returns an equals criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
bool | $caseSensitive | Whether the equality test should be done case-sensitive |
Implements QueryInterface.
Definition at line 473 of file Query.php.
References Query\CHARSET, and QueryInterface\OPERATOR_EQUAL_TO.
execute | ( | $returnRawQueryResult = false | ) |
Executes the query against the database and returns the result
bool | $returnRawQueryResult | avoids the object mapping by the persistence |
Implements QueryInterface.
Definition at line 236 of file Query.php.
Referenced by Query\count().
getConstraint | ( | ) |
Gets the constraint for this query.
Implements QueryInterface.
Definition at line 393 of file Query.php.
References Query\$constraint.
getLimit | ( | ) |
Returns the maximum size of the result set to limit.
Implements QueryInterface.
Definition at line 315 of file Query.php.
References Query\$limit.
getOffset | ( | ) |
Returns the start offset of the result set.
Implements QueryInterface.
Definition at line 344 of file Query.php.
References Query\$offset.
getOrderings | ( | ) |
Returns the property names to order the result by. Like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING )
Implements QueryInterface.
Definition at line 273 of file Query.php.
References Query\$orderings.
getQuerySettings | ( | ) |
Returns the Query Settings.
Exception |
Implements QueryInterface.
Definition at line 171 of file Query.php.
References Query\$querySettings.
|
protected |
Returns the selectorn name or an empty string, if the source is not a selector
Definition at line 206 of file Query.php.
References Query\$source, and Query\getSource().
getSource | ( | ) |
Gets the node-tuple source for this query.
Implements QueryInterface.
Definition at line 221 of file Query.php.
References Query\$source, and Query\getType().
Referenced by Query\getSelectorName().
getStatement | ( | ) |
Returns the statement of this query.
Implements QueryInterface.
Definition at line 382 of file Query.php.
References Query\$statement.
getType | ( | ) |
Returns the type this query cares for.
Implements QueryInterface.
Definition at line 185 of file Query.php.
References Query\$type.
Referenced by Query\getSource().
greaterThan | ( | $propertyName, | |
$operand | |||
) |
Returns a greater than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
Implements QueryInterface.
Definition at line 571 of file Query.php.
References QueryInterface\OPERATOR_GREATER_THAN.
greaterThanOrEqual | ( | $propertyName, | |
$operand | |||
) |
Returns a greater than or equal criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
Implements QueryInterface.
Definition at line 584 of file Query.php.
References QueryInterface\OPERATOR_GREATER_THAN_OR_EQUAL_TO.
Referenced by Query\between().
in | ( | $propertyName, | |
$operand | |||
) |
Returns an "in" criterion used for matching objects against a query. It matches if the property's value is contained in the multivalued operand.
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with, multivalued |
Exception\UnexpectedTypeException |
Implements QueryInterface.
Definition at line 529 of file Query.php.
References QueryInterface\OPERATOR_IN.
injectDataMapper | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper | $dataMapper | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper | $dataMapper |
Definition at line 120 of file Query.php.
References Query\$dataMapper.
injectObjectManager | ( | \TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager | ) |
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager |
Definition at line 112 of file Query.php.
References Query\$objectManager.
injectPersistenceManager | ( | \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface | $persistenceManager | ) |
\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface | $persistenceManager |
Definition at line 128 of file Query.php.
References Query\$persistenceManager.
injectQomFactory | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory | $qomFactory | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory | $qomFactory |
Definition at line 136 of file Query.php.
References Query\$qomFactory.
isEmpty | ( | $propertyName | ) |
Returns an "isEmpty" criterion used for matching objects against a query. It matches if the multivalued property contains no values or is NULL.
string | $propertyName | The name of the multivalued property to compare against |
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException | |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a single-valued property |
Implements QueryInterface.
lessThan | ( | $propertyName, | |
$operand | |||
) |
Returns a less than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
Implements QueryInterface.
Definition at line 545 of file Query.php.
References QueryInterface\OPERATOR_LESS_THAN.
lessThanOrEqual | ( | $propertyName, | |
$operand | |||
) |
Returns a less or equal than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
Implements QueryInterface.
Definition at line 558 of file Query.php.
References QueryInterface\OPERATOR_LESS_THAN_OR_EQUAL_TO.
Referenced by Query\between().
like | ( | $propertyName, | |
$operand, | |||
$caseSensitive = true |
|||
) |
Returns a like criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
bool | $caseSensitive | Whether the matching should be done case-sensitive |
Implements QueryInterface.
Definition at line 500 of file Query.php.
References QueryInterface\OPERATOR_LIKE.
logicalAnd | ( | $constraint1 | ) |
Performs a logical conjunction of the given constraints. The method takes one or more constraints and concatenates them with a boolean AND. It also accepts a single array of constraints to be concatenated.
mixed | $constraint1 | The first of multiple constraints or an array of constraints. |
Exception\InvalidNumberOfConstraintsException |
Implements QueryInterface.
Definition at line 407 of file Query.php.
References Query\$constraint.
Referenced by Query\between().
logicalNot | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface | $constraint | ) |
logicalOr | ( | $constraint1 | ) |
Performs a logical disjunction of the two given constraints
mixed | $constraint1 | The first of multiple constraints or an array of constraints. |
Exception\InvalidNumberOfConstraintsException |
Implements QueryInterface.
Definition at line 433 of file Query.php.
References Query\$constraint.
matching | ( | $constraint | ) |
The constraint used to limit the result set. Returns $this to allow for chaining (fluid interface)
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface | $constraint |
Implements QueryInterface.
Definition at line 357 of file Query.php.
References Query\$constraint.
setLimit | ( | $limit | ) |
Sets the maximum size of the result set to limit. Returns $this to allow for chaining (fluid interface)
int | $limit |
\InvalidArgumentException |
Implements QueryInterface.
Definition at line 287 of file Query.php.
References Query\$limit.
setOffset | ( | $offset | ) |
Sets the start offset of the result set to offset. Returns $this to allow for chaining (fluid interface)
int | $offset |
\InvalidArgumentException |
Implements QueryInterface.
Definition at line 329 of file Query.php.
References Query\$offset.
setOrderings | ( | array | $orderings | ) |
Sets the property names to order the result by. Expected like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING ) where 'foo' and 'bar' are property names.
array | $orderings | The property names to order by |
Implements QueryInterface.
Definition at line 257 of file Query.php.
References Query\$orderings.
setQuerySettings | ( | QuerySettingsInterface | $querySettings | ) |
Sets the Query Settings. These Query settings must match the settings expected by the specific Storage Backend.
QuerySettingsInterface | $querySettings | The Query Settings |
Definition at line 159 of file Query.php.
References Query\$querySettings.
setSource | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface | $source | ) |
Sets the source to fetch the result from
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface | $source |
Definition at line 195 of file Query.php.
References Query\$source.
statement | ( | $statement, | |
array | $parameters = array() |
||
) |
Sets the statement of this query. If you use this, you will lose the abstraction from a concrete storage backend (database).
string | \TYPO3\CMS\Core\Database\PreparedStatement | $statement | The statement |
array | $parameters | An array of parameters. These will be bound to placeholders '?' in the $statement. |
Definition at line 371 of file Query.php.
References Query\$statement.
unsetLimit | ( | ) |
Resets a previously set maximum size of the result set. Returns $this to allow for chaining (fluid interface)
|
protected |
Definition at line 80 of file Query.php.
Referenced by Query\getConstraint(), Query\logicalAnd(), Query\logicalOr(), and Query\matching().
|
protected |
Definition at line 59 of file Query.php.
Referenced by Query\injectDataMapper().
|
protected |
Definition at line 95 of file Query.php.
Referenced by Query\getLimit(), and Query\setLimit().
|
protected |
Definition at line 54 of file Query.php.
Referenced by Query\injectObjectManager().
|
protected |
Definition at line 100 of file Query.php.
Referenced by Query\getOffset(), and Query\setOffset().
|
protected |
Definition at line 90 of file Query.php.
Referenced by Query\getOrderings(), and Query\setOrderings().
|
protected |
Definition at line 65 of file Query.php.
Referenced by Query\injectPersistenceManager().
|
protected |
Definition at line 70 of file Query.php.
Referenced by Query\injectQomFactory().
|
protected |
Definition at line 107 of file Query.php.
Referenced by Query\getQuerySettings(), and Query\setQuerySettings().
|
protected |
Definition at line 75 of file Query.php.
Referenced by Query\getSelectorName(), Query\getSource(), and Query\setSource().
|
protected |
Definition at line 85 of file Query.php.
Referenced by Query\getStatement(), and Query\statement().
|
protected |
Definition at line 49 of file Query.php.
Referenced by Query\__construct(), and Query\getType().
const CHARSET = 'utf-8' |
const JCR_JOIN_TYPE_INNER = '{http://www.jcp.org/jcr/1.0}joinTypeInner' |
const JCR_JOIN_TYPE_LEFT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeLeftOuter' |