Class Xyster_Orm_Query

Description

A query object

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Orm/Query.php (line 28)


	
			
Direct descendents
Class Description
Xyster_Orm_Query_Report A report query object
Class Constant Summary
 LIMIT = 'limit'
 OFFSET = 'offset'
 ORDER = 'order'
 WHERE = 'where'
Variable Summary
Method Summary
Xyster_Orm_Query __construct (string $class, Xyster_Orm_Manager $manager)
array getBackendWhere ()
string getFrom ()
int getLimit ()
int getOffset ()
mixed getPart (string $part)
array getWhere ()
boolean hasRuntimeOrder ()
boolean hasRuntimeWhere ()
boolean isRuntime ()
Xyster_Orm_Query limit (int $limit, [int $offset = 0])
Xyster_Orm_Query order ( $order)
Xyster_Orm_Query where ( $where)
void _initParts ()
Variables
array $_backend = array() (line 54)

The parts of the query that can be used in the backend

  • access: protected
string $_class = '' (line 40)

The entity being queried

  • access: protected
Xyster_Orm_Manager $_manager (line 61)

The orm manager

  • access: protected
Xyster_Orm_Entity_Type $_meta (line 68)

The entity meta

  • access: protected
array $_parts = array() (line 47)

The parts of the query

  • access: protected
array $_runtime = array() (line 75)

The parts of the query that must be used at runtime

  • access: protected
Methods
Constructor __construct (line 82)

Creates a new query object

  • access: public
Xyster_Orm_Query __construct (string $class, Xyster_Orm_Manager $manager)
execute (line 95)

Executes the query

  • access: public
Xyster_Orm_Set execute ()

Redefined in descendants as:
getBackendWhere (line 137)

Gets the criteria that can be run in the backend

  • access: public
array getBackendWhere ()
getFrom (line 147)

Gets the entity class being queried

  • return: the entity class name
  • access: public
string getFrom ()
getLimit (line 157)

Gets the maximum number of results to be returned

  • return: the maximum result count
  • access: public
int getLimit ()
getOffset (line 167)

Gets the starting point in the results

  • return: the offset starting point
  • access: public
int getOffset ()
getOrder (line 177)

Gets the order clause (an array of Xyster_Data_Sort objects)

  • access: public
getPart (line 188)

Gets a part of the query

  • access: public
mixed getPart (string $part)
  • string $part: one of the class constants
getWhere (line 199)

Gets the where clause (an array of Xyster_Data_Criterion objects)

  • access: public
array getWhere ()
hasRuntimeOrder (line 209)

Gets whether this query has an order clause that evaluates at runtime

  • access: public
boolean hasRuntimeOrder ()
hasRuntimeWhere (line 219)

Gets whether this query has a where clause that evaluates at runtime

  • access: public
boolean hasRuntimeWhere ()
isRuntime (line 229)

Gets whether this query has parts that are evaluated at runtime

  • access: public
boolean isRuntime ()

Redefined in descendants as:
limit (line 241)

Impose a maximum number of records to return and a number to skip

  • return: provides a fluent interface
  • access: public
Xyster_Orm_Query limit (int $limit, [int $offset = 0])
  • int $limit: The maximum number of records to return
  • int $offset: The number of records to skip
order (line 254)

Adds a sorting to the results

  • return: provides a fluent interface
  • access: public
Xyster_Orm_Query order ( $order)
where (line 270)

Adds a criterion to the selection

  • return: provides a fluent interface
  • access: public
Xyster_Orm_Query where ( $where)
_initParts (line 295)

Initializes the parts container

  • access: protected
void _initParts ()

Redefined in descendants as:
Class Constants
LIMIT = 'limit' (line 32)
OFFSET = 'offset' (line 33)
ORDER = 'order' (line 31)
WHERE = 'where' (line 30)

Documentation generated on Mon, 19 May 2008 17:07:30 -0400 by phpDocumentor 1.4.2