Extbase\Persistence

Class Tx_Extbase_Persistence_Query

All Implemented Interfaces:


public class Tx_Extbase_Persistence_Query
implements Tx_Extbase_Persistence_QueryInterface, Tx_Extbase_Persistence_QuerySettingsInterface

The Query class used to run queries against the database

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


Method Summary

 Tx_Extbase_Persistence_QuerySettingsInterface getQuerySettings()
  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($constraint)
  logicalAnd(object $constraint1, object $constraint2)
  logicalOr(object $constraint1, object $constraint2)
  logicalNot(object $constraint)
  withUid(int $uid)
  equals(string $propertyName, mixed $operand, boolean $caseSensitive=TRUE)
  like(string $propertyName, mixed $operand)
  lessThan(string $propertyName, mixed $operand)
  lessThanOrEqual(string $propertyName, mixed $operand)
  greaterThan(string $propertyName, mixed $operand)
  greaterThanOrEqual(string $propertyName, mixed $operand)

Method Detail

getQuerySettings

public Tx_Extbase_Persistence_QuerySettingsInterface getQuerySettings()

Returns the Query Settings.

execute

public  execute()

Executes the query against the database and returns the result

Description Copied From interface:

Executes the query against the backend and returns the result

Specified By

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 )

Description Copied From interface:

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 )

Specified By

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)

Description Copied From interface:

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

Specified By

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)

Description Copied From interface:

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

Specified By

Parameters

$offset -

matching

public Tx_Extbase_Persistence_QueryInterface matching($constraint)

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

Description Copied From interface:

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

Specified By

Parameters

$constraint -

logicalAnd

public  logicalAnd(object $constraint1, object $constraint2)

Performs a logical conjunction of the two given constraints.

Description Copied From interface:

Performs a logical conjunction of the two given constraints.

Specified By

Parameters

$constraint1 - First constraint
$constraint2 - Second constraint

logicalOr

public  logicalOr(object $constraint1, object $constraint2)

Performs a logical disjunction of the two given constraints

Description Copied From interface:

Performs a logical disjunction of the two given constraints

Specified By

Parameters

$constraint1 - First constraint
$constraint2 - Second constraint

logicalNot

public  logicalNot(object $constraint)

Performs a logical negation of the given constraint

Description Copied From interface:

Performs a logical negation of the given constraint

Specified By

Parameters

$constraint - Constraint to negate

withUid

public  withUid(int $uid)

Matches against the (internal) uid.

Description Copied From interface:

Matches against the (internal) identifier.

Specified By

Parameters

$uid - The uid to match against

equals

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

Returns an equals criterion used for matching objects against a query

Description Copied From interface:

Returns an equals criterion used for matching objects against a query

Specified By

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  like(string $propertyName, mixed $operand)

Returns a like criterion used for matching objects against a query

Description Copied From interface:

Returns a like criterion used for matching objects against a query

Specified By

Parameters

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

lessThan

public  lessThan(string $propertyName, mixed $operand)

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

Description Copied From interface:

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

Specified By

Parameters

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

lessThanOrEqual

public  lessThanOrEqual(string $propertyName, mixed $operand)

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

Description Copied From interface:

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

Specified By

Parameters

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

greaterThan

public  greaterThan(string $propertyName, mixed $operand)

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

Description Copied From interface:

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

Specified By

Parameters

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

greaterThanOrEqual

public  greaterThanOrEqual(string $propertyName, mixed $operand)

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

Description Copied From interface:

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

Specified By

Parameters

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