Flat-file DB mapper.
More...
|
| dbtype () |
|
| exists ($key) |
|
| set ($key, $val) |
|
& | get ($key) |
|
| clear ($key) |
|
| cast ($obj=NULL) |
|
| token ($str) |
|
| find ($filter=NULL, array $options=NULL, $ttl=0, $log=TRUE) |
|
| count ($filter=NULL, $ttl=0) |
|
| skip ($ofs=1) |
|
| insert () |
|
| update () |
|
| erase ($filter=NULL) |
|
| reset () |
|
| copyfrom ($key, $func=NULL) |
|
| copyto ($key) |
|
| fields () |
|
| getiterator () |
|
| __construct (\DB\Jig $db, $file) |
|
| 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) |
|
|
| $file |
| Data file.
|
|
| $id |
| Document identifier.
|
|
| $document =array() |
| Document contents.
|
|
| $ptr =0 |
| Current position.
|
|
| $trigger =array() |
| Event listeners.
|
|
const | E_Field ='Undefined field %s' |
|
|
| $db |
| Flat-file DB wrapper.
|
|
| $query =array() |
| Query results.
|
|
DB\Jig\Mapper::__construct |
( |
\DB\Jig |
$db, |
|
|
|
$file |
|
) |
| |
Instantiate class
- Returns
- void
- Parameters
-
DB\Jig\Mapper::cast |
( |
|
$obj = NULL | ) |
|
Return fields of mapper object as an associative array
- Returns
- array
- Parameters
-
DB\Jig\Mapper::clear |
( |
|
$key | ) |
|
Delete field
- Returns
- NULL
- Parameters
-
DB\Jig\Mapper::copyfrom |
( |
|
$key, |
|
|
|
$func = NULL |
|
) |
| |
Hydrate mapper object using hive array variable
- Returns
- NULL
- Parameters
-
DB\Jig\Mapper::copyto |
( |
|
$key | ) |
|
Populate hive array variable with mapper fields
- Returns
- NULL
- Parameters
-
DB\Jig\Mapper::count |
( |
|
$filter = NULL , |
|
|
|
$ttl = 0 |
|
) |
| |
Count records that match criteria
- Returns
- int
- Parameters
-
DB\Jig\Mapper::dbtype |
( |
| ) |
|
Return database type
- Returns
- string
DB\Jig\Mapper::erase |
( |
|
$filter = NULL | ) |
|
Delete current record
- Returns
- bool
- Parameters
-
DB\Jig\Mapper::exists |
( |
|
$key | ) |
|
Return TRUE if field is defined
- Returns
- bool
- Parameters
-
DB\Jig\Mapper::factory |
( |
|
$id, |
|
|
|
$row |
|
) |
| |
|
protected |
Convert array to mapper object
- Returns
- object
- Parameters
-
DB\Jig\Mapper::fields |
( |
| ) |
|
Return field names
- Returns
- array
DB\Jig\Mapper::find |
( |
|
$filter = NULL , |
|
|
array |
$options = NULL , |
|
|
|
$ttl = 0 , |
|
|
|
$log = TRUE |
|
) |
| |
Return records that match criteria
- Returns
- array|FALSE
- Parameters
-
$filter | array |
$options | array |
$ttl | int |
$log | bool |
& DB\Jig\Mapper::get |
( |
|
$key | ) |
|
Retrieve value of field
- Returns
- scalar|FALSE
- Parameters
-
DB\Jig\Mapper::getiterator |
( |
| ) |
|
Retrieve external iterator for fields
- Returns
- object
DB\Jig\Mapper::insert |
( |
| ) |
|
Insert new record
- Returns
- array
DB\Jig\Mapper::set |
( |
|
$key, |
|
|
|
$val |
|
) |
| |
Assign value to field
- Returns
- scalar|FALSE
- Parameters
-
DB\Jig\Mapper::skip |
( |
|
$ofs = 1 | ) |
|
Return record at specified offset using criteria of previous load() call and make it active
- Returns
- array
- Parameters
-
DB\Jig\Mapper::token |
( |
|
$str | ) |
|
Convert tokens in string expression to variable names
- Returns
- string
- Parameters
-
DB\Jig\Mapper::update |
( |
| ) |
|
Update current record
- Returns
- array
The documentation for this class was generated from the following file: