Extbase\Persistence

Interface Tx_Extbase_Persistence_QueryInterface

All Known Implementing Classes:


public interface Tx_Extbase_Persistence_QueryInterface

A persistence query interface

Package: Extbase
Subpackage: Persistence
Version: $Id: QueryInterface.php 658 2009-05-16 13:54:16Z jocrau $


Method Summary

  execute()
 Tx_Extbase_Persistence_QueryInterface setOrderings(array $orderings)
 Tx_Extbase_Persistence_QueryInterface setLimit(integer $limit)
 Tx_Extbase_Persistence_QueryInterface setOffset(integer $offset)
 Tx_Extbase_Persistence_QueryInterface matching(object $constraint)
 object logicalAnd(object $constraint1, object $constraint2)
 object logicalOr(object $constraint1, object $constraint2)
 object logicalNot(object $constraint)
 object withUid(string $uid)
 object equals(string $propertyName, mixed $operand, boolean $caseSensitive=TRUE)
 object like(string $propertyName, mixed $operand)
 object lessThan(string $propertyName, mixed $operand)
 object lessThanOrEqual(string $propertyName, mixed $operand)
 object greaterThan(string $propertyName, mixed $operand)
 object greaterThanOrEqual(string $propertyName, mixed $operand)

Method Detail

execute

public  execute()

Executes the query against the backend and returns the result

setOrderings

public Tx_Extbase_Persistence_QueryInterface setOrderings(array $orderings)

Sets the property names to order the result by. Expected like this:
array( 'foo' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING, 'bar' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING )

Parameters

$orderings - The property names to order by

setLimit

public Tx_Extbase_Persistence_QueryInterface setLimit(integer $limit)

Sets the maximum size of the result set to limit. Returns $this to allow for chaining (fluid interface)

Parameters

$limit -

setOffset

public Tx_Extbase_Persistence_QueryInterface setOffset(integer $offset)

Sets the start offset of the result set to offset. Returns $this to allow for chaining (fluid interface)

Parameters

$offset -

matching

public Tx_Extbase_Persistence_QueryInterface matching(object $constraint)

The constraint used to limit the result set. Returns $this to allow for chaining (fluid interface)

Parameters

$constraint - Some constraint, depending on the backend

logicalAnd

public object logicalAnd(object $constraint1, object $constraint2)

Performs a logical conjunction of the two given constraints.

Parameters

$constraint1 - First constraint
$constraint2 - Second constraint

logicalOr

public object logicalOr(object $constraint1, object $constraint2)

Performs a logical disjunction of the two given constraints

Parameters

$constraint1 - First constraint
$constraint2 - Second constraint

logicalNot

public object logicalNot(object $constraint)

Performs a logical negation of the given constraint

Parameters

$constraint - Constraint to negate

withUid

public object withUid(string $uid)

Matches against the (internal) identifier.

Parameters

$uid - An identifier to match against

equals

public object equals(string $propertyName, mixed $operand, boolean $caseSensitive=TRUE)

Returns an equals criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with
$caseSensitive - Whether the equality test should be done case-sensitive

like

public object like(string $propertyName, mixed $operand)

Returns a like criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with

lessThan

public object lessThan(string $propertyName, mixed $operand)

Returns a less than criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with

lessThanOrEqual

public object lessThanOrEqual(string $propertyName, mixed $operand)

Returns a less or equal than criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with

greaterThan

public object greaterThan(string $propertyName, mixed $operand)

Returns a greater than criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with

greaterThanOrEqual

public object greaterThanOrEqual(string $propertyName, mixed $operand)

Returns a greater than or equal criterion used for matching objects against a query

Parameters

$propertyName - The name of the property to compare against
$operand - The value to compare with