Search criteria for TDbDataGateway.
Criteria object for data gateway finder methods. Usage:
- $criteria = new TSqlCriteria();
- $criteria->Parameters[':name'] = 'admin';
- $criteria->Parameters[':pass'] = 'prado';
- $criteria->OrdersBy['level'] = 'desc';
- $criteria->OrdersBy['name'] = 'asc';
- $criteria->Limit = 10;
- $criteria->Offset = 20;
Method Details |
getCondition
public string getCondition |
() |
Output |
string
| search conditions. |
Exception |
|
getIsNamedParameters
public boolean getIsNamedParameters |
() |
Output |
boolean
| true if the parameter index are string base, false otherwise. |
Exception |
|
getLimit
Output |
int
| maximum number of records to return. |
Exception |
|
getOffset
Output |
int
| record offset. |
Exception |
|
getOrdersBy
|
getParameters
|
setCondition
public void setCondition |
(string $value ) |
Sets the search conditions to be placed after the WHERE clause in the SQL.
Input |
string | $value | search conditions. |
Output |
Exception |
|
setLimit
public void setLimit |
(int $value ) |
Input |
int | $value | maximum number of records to return. |
Output |
Exception |
|
setOffset
public void setOffset |
(int $value ) |
Input |
int | $value | record offset. |
Output |
Exception |
|
setOrdersBy
public void setOrdersBy |
(mixed $value ) |
Input |
mixed | $value | ordering clause. |
Output |
Exception |
|
setParameters
public void setParameters |
(ArrayAccess $value ) |
Input |
ArrayAccess | $value | named parameters. |
Output |
Exception |
|
__toString
public string __toString |
() |
Output |
string
| string representation of the parameters. Useful for debugging. |
Exception |
|