Simple cursor implementation.
More...
|
| dbtype () |
|
| 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) |
|
| first () |
|
| last () |
|
| skip ($ofs=1) |
|
| next () |
|
| prev () |
|
| save () |
|
| erase () |
|
| onload ($func) |
|
| beforeinsert ($func) |
|
| afterinsert ($func) |
|
| oninsert ($func) |
|
| beforeupdate ($func) |
|
| afterupdate ($func) |
|
| onupdate ($func) |
|
| beforeerase ($func) |
|
| aftererase ($func) |
|
| onerase ($func) |
|
| reset () |
|
| exists ($key) |
|
| set ($key, $val) |
|
| get ($key) |
|
| clear ($key) |
|
| offsetexists ($key) |
|
| __isset ($key) |
|
| offsetset ($key, $val) |
|
| __set ($key, $val) |
|
| offsetget ($key) |
|
| __get ($key) |
|
| offsetunset ($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::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::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
Return TRUE if current cursor position is not mapped to any record
- Returns
- bool
Delete current record
- Returns
- int|bool
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 |
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::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
The documentation for this class was generated from the following file: