Zend Framework
1.12
|
Public Member Functions | |
__call ($name, $args) | |
Generic clause. | |
select ($select) | |
SELECT clause (fields to be selected) | |
from ($name) | |
FROM clause. | |
where ($cond, $value=null, $op= 'and') | |
WHERE query. | |
whereId ($value) | |
Select record or fields by ID. | |
limit ($limit) | |
LIMIT clause (how many items to return) | |
order ($sort, $direction= 'asc') | |
ORDER clause; field or fields to sort by, and direction to sort. | |
assemble () | |
"Assemble" the query | |
getClauses () | |
Return query clauses as an array. | |
Public Attributes | |
const | QUERY_SELECT = 'select' |
Known query types. | |
const | QUERY_FROM = 'from' |
const | QUERY_WHERE = 'where' |
const | QUERY_WHEREID = 'whereid' |
const | QUERY_LIMIT = 'limit' |
const | QUERY_ORDER = 'order' |
Protected Attributes | |
$_clauses = array() | |
__call | ( | $name, | |
$args | |||
) |
Generic clause.
You can use any clause by doing $query->foo('bar') but concrete adapters should be able to recognise it
The call will be iterpreted as clause 'foo' with argument 'bar'
string | $name | Clause/method name |
mixed | $args |
assemble | ( | ) |
"Assemble" the query
Simply returns the clauses present.
Implements Zend_Cloud_DocumentService_QueryAdapter.
from | ( | $name | ) |
getClauses | ( | ) |
Return query clauses as an array.
limit | ( | $limit | ) |
LIMIT clause (how many items to return)
int | $limit |
Implements Zend_Cloud_DocumentService_QueryAdapter.
order | ( | $sort, | |
$direction = 'asc' |
|||
) |
ORDER clause; field or fields to sort by, and direction to sort.
string | int | array | $sort | |
string | $direction |
Implements Zend_Cloud_DocumentService_QueryAdapter.
select | ( | $select | ) |
SELECT clause (fields to be selected)
null | string | array | $select |
Implements Zend_Cloud_DocumentService_QueryAdapter.
where | ( | $cond, | |
$value = null , |
|||
$op = 'and' |
|||
) |
WHERE query.
string | $cond | Condition |
array | $args | Arguments to substitute instead of ?'s in condition |
string | $op | relation to other clauses - and/or |
Implements Zend_Cloud_DocumentService_QueryAdapter.
whereId | ( | $value | ) |
Select record or fields by ID.
string | int | $value | Identifier to select by |
Implements Zend_Cloud_DocumentService_QueryAdapter.
|
protected |
const QUERY_FROM = 'from' |
const QUERY_LIMIT = 'limit' |
const QUERY_ORDER = 'order' |
const QUERY_SELECT = 'select' |
Known query types.
const QUERY_WHERE = 'where' |
const QUERY_WHEREID = 'whereid' |