Class Horde_Rdo_Query

Description

Located in /Rdo/lib/Horde/Rdo/Query.php (line 13)


	
			
Variable Summary
Method Summary
 static Horde_Rdo_Query create (mixed $query, [Horde_Rdo_Mapper $mapper = null])
 Horde_Rdo_Query __construct ([Horde_Rdo_Mapper $mapper = null])
 Horde_Rdo_Query addFields (array $fields, [ $fieldPrefix = null])
 void addRelationship ( $relationship,  $args)
 void addTest ( $field,  $test,  $value)
 void clearSort ()
 void combineWith (string $conjunction)
 void limit (integer $limit, [integer $offset = null])
 Horde_Rdo_Query setFields (array $fields, [ $fieldPrefix = null])
 void sortBy (string $field, [constant $direction = Horde_Rdo::SORT_ASC])
 array _fillJoinPlaceholders (Horde_Rdo_Mapper $m1, Horde_Rdo_Mapper $m2, array $query)
 void _prefix ( &$fieldName,  $key,  $prefix)
 void __get (string $key)
Variables
string $conjunction = 'AND' (line 23)
  • access: public
array $fields = array('*') (line 28)
  • access: public
integer $limit (line 48)
  • access: public
integer $limitOffset = null (line 53)
  • access: public
Horde_Rdo_Mapper $mapper (line 18)
  • access: public
array $relationships = array() (line 38)
  • access: public
array $tests = array() (line 33)
  • access: public
array $_sortby = array() (line 43)
  • access: protected
Methods
static create (line 66)

Turn any of the acceptable query shorthands into a full Horde_Rdo_Query object. If you pass an existing Horde_Rdo_Query object in, it will be cloned before it's returned so that it can be safely modified.

  • return: The full Horde_Rdo_Query object.
  • access: public
static Horde_Rdo_Query create (mixed $query, [Horde_Rdo_Mapper $mapper = null])
  • mixed $query: The query to convert to an object.
  • Horde_Rdo_Mapper $mapper: The Mapper object governing this query.
Constructor __construct (line 94)
  • access: public
Horde_Rdo_Query __construct ([Horde_Rdo_Mapper $mapper = null])
addFields (line 185)
  • return: Returns self for fluent method chaining.
  • access: public
Horde_Rdo_Query addFields (array $fields, [ $fieldPrefix = null])
  • array $fields: Additional Fields to load with this query.
  • $fieldPrefix
addRelationship (line 214)
  • access: public
void addRelationship ( $relationship,  $args)
  • $relationship
  • $args
addTest (line 204)
  • access: public
void addTest ( $field,  $test,  $value)
  • $field
  • $test
  • $value
clearSort (line 256)
  • access: public
void clearSort ()
combineWith (line 196)
  • access: public
void combineWith (string $conjunction)
  • string $conjunction: SQL conjunction such as "AND", "OR".
limit (line 268)

Restrict the query to a subset of the results.

  • access: public
void limit (integer $limit, [integer $offset = null])
  • integer $limit: Number of items to fetch.
  • integer $offset: Offset to start fetching at.
setFields (line 168)
  • return: Returns self for fluent method chaining.
  • access: public
Horde_Rdo_Query setFields (array $fields, [ $fieldPrefix = null])
  • array $fields: The fields to load with this query.
  • $fieldPrefix
setMapper (line 104)
  • return: Return the query object for fluent chaining.
  • access: public
Horde_Rdo_Query setMapper (Horde_Rdo_Mapper $mapper)
sortBy (line 248)

Add a sorting rule.

  • access: public
void sortBy (string $field, [constant $direction = Horde_Rdo::SORT_ASC])
  • string $field: The field to sort by.
  • constant $direction: Sort ascending (Horde_Rdo::SORT_ASC) or descending (Horde_Rdo::SORT_DESC).
_fillJoinPlaceholders (line 320)

Take a query array and replace @field@ placeholders with values that will match in the load query.

  • return: The query with placeholders filled in.
  • access: protected
array _fillJoinPlaceholders (Horde_Rdo_Mapper $m1, Horde_Rdo_Mapper $m2, array $query)
_prefix (line 305)

Callback for array_walk to prefix all elements of an array with a given prefix.

  • access: protected
void _prefix ( &$fieldName,  $key,  $prefix)
  • &$fieldName
  • $key
  • $prefix
__get (line 280)

Accessor for any fields that we want some logic around.

  • access: public
void __get (string $key)
  • string $key

Documentation generated on Sun, 30 Jan 2011 05:20:42 +0000 by phpDocumentor 1.4.3