static void __set_state(
array
$properties
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Allows object importing from var_export().
Parameters:
|
array |
$properties: |
List of object properties. |
API Tags:
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
OTS_Base_List __construct(
)
|
|
Sets database connection handler.
Sets database connection handler.
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Redefined in descendants as:
Returns number of rows on list in current criterium.
Returns number of rows on list in current criterium.
API Tags:
| Return: | Number of rows. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Version: | 0.0.5 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.0.5 |
Implementation of:
- Countable::count
Returns current row.
Returns current row.
Returns object of class which handle single row representation. Object is initialised with ID of current position in result cursor.
API Tags:
| Return: | Current row. |
| Access: | public |
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Implementation of:
- Iterator::current
Redefined in descendants as:
string getSQL(
[bool
$count = false]
)
|
|
Returns SQL query for SELECT.
Returns SQL query for SELECT.
Parameters:
|
bool |
$count: |
Shows if the SQL should be generated for COUNT() variant. |
API Tags:
| Return: | SQL query part. |
| Access: | protected |
Information Tags:
| Version: | 0.1.5 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Redefined in descendants as:
Sets list parameters.
Sets list parameters.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Redefined in descendants as:
Current cursor position.
Current cursor position.
API Tags:
| Return: | Array key. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Implementation of:
- Iterator::key
Moves to next row.
Moves to next row.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Implementation of:
- Iterator::next
void orderBy(
OTS_SQLField|string
$field, [int
$order = POT::ORDER_ASC]
)
|
|
Appends sorting rule.
Appends sorting rule.
First parameter may be of type string, then it will be used as literal field name, or object of OTS_SQLField class, then it's representation will be used as qualiffied SQL identifier name.
Note: Since 0.0.7 version $field parameter can be instance of OTS_SQLField class.
Parameters:
|
OTS_SQLField|string |
$field: |
Field name. |
|
int |
$order: |
Sorting order (ascending by default). |
API Tags:
Information Tags:
| Version: | 0.0.7 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
string prepareSQL(
array
$fields, [bool
$count = false]
)
|
|
Returns generic SQL query that can be adaptated by child classes.
Returns generic SQL query that can be adaptated by child classes.
Parameters:
|
array |
$fields: |
Fields to be selected. |
|
bool |
$count: |
Shows if the SQL should be generated for COUNT() variant. |
API Tags:
| Return: | SQL query. |
| Access: | protected |
Information Tags:
| Version: | 0.1.5 |
| Version: | 0.0.5 |
| Since: | 0.0.5 |
| Since: | 0.1.5 |
Clears ORDER BY clause.
Clears ORDER BY clause.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Select rows from database.
Select rows from database.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.0.5 |
Implementation of:
- Iterator::rewind
Redefined in descendants as:
Sets filter on list.
Sets filter on list.
Call without argument to reset filter.
Parameters:
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
void setLimit(
[int|bool
$limit = false]
)
|
|
Sets LIMIT clause.
Sets LIMIT clause.
Reduces amount of seleced rows up to given number.
Parameters:
|
int|bool |
$limit: |
Limit for SELECT (false to reset). |
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
void setOffset(
[int|bool
$offset = false]
)
|
|
Sets OFFSET clause.
Sets OFFSET clause.
Moves starting rows of selected set to given position.
Parameters:
|
int|bool |
$offset: |
Offset for SELECT (false to reset). |
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Checks if there are any rows left.
Checks if there are any rows left.
API Tags:
| Return: | Does next row exist. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Implementation of:
- Iterator::valid
void __set(
string
$name, mixed
$value
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
|
mixed |
$value: |
Property value. |
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Version: | 0.0.5 |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.1.0 |
| Since: | 0.0.5 |
Magic PHP5 method.
Magic PHP5 method.
Allows object serialisation.
API Tags:
| Return: | List of properties that should be saved. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |
Magic PHP5 method.
Magic PHP5 method.
Allows object unserialisation.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Since: | 0.0.5 |