Simple cursor implementation.
More...
|
| | dbtype () |
| |
| | fields () |
| |
| | cast ($obj=NULL) |
| |
| | find ($filter=NULL, array $options=NULL, $ttl=0) |
| |
| | count ($filter=NULL, $ttl=0) |
| |
| | insert () |
| |
| | update () |
| |
| | copyfrom ($key, $func=NULL) |
| |
| | copyto ($key) |
| |
| | dry () |
| |
| | findone ($filter=NULL, array $options=NULL, $ttl=0) |
| |
| | paginate ($pos=0, $size=10, $filter=NULL, array $options=NULL, $ttl=0) |
| |
| | load ($filter=NULL, array $options=NULL, $ttl=0) |
| |
| | loaded () |
| |
| | first () |
| |
| | last () |
| |
| | skip ($ofs=1) |
| |
| | next () |
| |
| | prev () |
| |
| | valid () |
| |
| | save () |
| |
| | erase () |
| |
| | onload ($func) |
| |
| | beforeinsert ($func) |
| |
| | afterinsert ($func) |
| |
| | oninsert ($func) |
| |
| | beforeupdate ($func) |
| |
| | afterupdate ($func) |
| |
| | onupdate ($func) |
| |
| | beforesave ($func) |
| |
| | aftersave ($func) |
| |
| | onsave ($func) |
| |
| | beforeerase ($func) |
| |
| | aftererase ($func) |
| |
| | onerase ($func) |
| |
| | reset () |
| |
| | exists ($key) |
| |
| | set ($key, $val) |
| |
| & | get ($key) |
| |
| | clear ($key) |
| |
| | offsetexists ($key) |
| |
| | offsetset ($key, $val) |
| |
| & | offsetget ($key) |
| |
| | offsetunset ($key) |
| |
| | __isset ($key) |
| |
| | __set ($key, $val) |
| |
| & | __get ($key) |
| |
| | __unset ($key) |
| |
|
|
| $ptr =0 |
| | Current position.
|
| |
|
| $trigger =array() |
| | Event listeners.
|
| |
|
|
const | E_Field ='Undefined field %s' |
| |
|
|
| $query =array() |
| | Query results.
|
| |
Simple cursor implementation.
| DB\Cursor::aftererase |
( |
|
$func | ) |
|
Define aftererase trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::afterinsert |
( |
|
$func | ) |
|
Define afterinsert trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::aftersave |
( |
|
$func | ) |
|
Define aftersave trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::afterupdate |
( |
|
$func | ) |
|
Define afterupdate trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::beforeerase |
( |
|
$func | ) |
|
Define beforeerase trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::beforeinsert |
( |
|
$func | ) |
|
Define beforeinsert trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::beforesave |
( |
|
$func | ) |
|
Define beforesave trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::beforeupdate |
( |
|
$func | ) |
|
Define beforeupdate trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::cast |
( |
|
$obj = NULL | ) |
|
|
abstract |
Return fields of mapper object as an associative array
- Returns
- array
- Parameters
-
| DB\Cursor::copyfrom |
( |
|
$key, |
|
|
|
$func = NULL |
|
) |
| |
|
abstract |
Hydrate mapper object using hive array variable
- Returns
- NULL
- Parameters
-
| DB\Cursor::copyto |
( |
|
$key | ) |
|
|
abstract |
Populate hive array variable with mapper fields
- Returns
- NULL
- Parameters
-
| DB\Cursor::count |
( |
|
$filter = NULL, |
|
|
|
$ttl = 0 |
|
) |
| |
|
abstract |
Count records that match criteria
- Returns
- int
- Parameters
-
Return database type
- Returns
- string
Get cursor's equivalent external iterator Causes a fatal error in PHP 5.3.5if uncommented return ArrayIterator Return TRUE if current cursor position is not mapped to any record
- Returns
- bool
Delete current record
- Returns
- int|bool
Return field names
- Returns
- array
| DB\Cursor::find |
( |
|
$filter = NULL, |
|
|
array |
$options = NULL, |
|
|
|
$ttl = 0 |
|
) |
| |
|
abstract |
Return records (array of mapper objects) that match criteria
- Returns
- array
- Parameters
-
| $filter | string|array |
| $options | array |
| $ttl | int |
| DB\Cursor::findone |
( |
|
$filter = NULL, |
|
|
array |
$options = NULL, |
|
|
|
$ttl = 0 |
|
) |
| |
Return first record (mapper object) that matches criteria
- Returns
- object|FALSE
- Parameters
-
| $filter | string|array |
| $options | array |
| $ttl | int |
Map to first record in cursor
- Returns
- mixed
Insert new record
- Returns
- array
Map to last record in cursor
- Returns
- mixed
| DB\Cursor::load |
( |
|
$filter = NULL, |
|
|
array |
$options = NULL, |
|
|
|
$ttl = 0 |
|
) |
| |
Map to first record that matches criteria
- Returns
- array|FALSE
- Parameters
-
| $filter | string|array |
| $options | array |
| $ttl | int |
Return the count of records loaded
- Returns
- int
Map next record
- Returns
- mixed
| DB\Cursor::onerase |
( |
|
$func | ) |
|
Define onerase trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::oninsert |
( |
|
$func | ) |
|
Define oninsert trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::onload |
( |
|
$func | ) |
|
Define onload trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::onsave |
( |
|
$func | ) |
|
Define onsave trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::onupdate |
( |
|
$func | ) |
|
Define onupdate trigger
- Returns
- callback
- Parameters
-
| DB\Cursor::paginate |
( |
|
$pos = 0, |
|
|
|
$size = 10, |
|
|
|
$filter = NULL, |
|
|
array |
$options = NULL, |
|
|
|
$ttl = 0 |
|
) |
| |
Return array containing subset of records matching criteria, total number of records in superset, specified limit, number of subsets available, and actual subset position
- Returns
- array
- Parameters
-
| $pos | int |
| $size | int |
| $filter | string|array |
| $options | array |
| $ttl | int |
Map previous record
- Returns
- mixed
Save mapped record
- Returns
- mixed
| DB\Cursor::skip |
( |
|
$ofs = 1 | ) |
|
Map to nth record relative to current cursor position
- Returns
- mixed
- Parameters
-
Update current record
- Returns
- array
Return whether current iterator position is valid.
The documentation for this class was generated from the following file: