MongoDB mapper.
More...
|
| dbtype () |
|
| exists ($key) |
|
| set ($key, $val) |
|
| get ($key) |
|
| clear ($key) |
|
| cast ($obj=NULL) |
|
| select ($fields=NULL, $filter=NULL, array $options=NULL, $ttl=0) |
|
| find ($filter=NULL, array $options=NULL, $ttl=0) |
|
| count ($filter=NULL, $ttl=0) |
|
| skip ($ofs=1) |
|
| insert () |
|
| update () |
|
| erase ($filter=NULL) |
|
| reset () |
|
| copyfrom ($key, $func=NULL) |
|
| copyto ($key) |
|
| fields () |
|
| cursor () |
|
| __construct (\DB\Mongo $db, $collection) |
|
| 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) |
|
|
| $db |
| MongoDB wrapper.
|
|
| $query =array() |
| Query results.
|
|
DB\Mongo\Mapper::__construct |
( |
\DB\Mongo |
$db, |
|
|
|
$collection |
|
) |
| |
Instantiate class
- Returns
- void
- Parameters
-
$db | object |
$collection | string |
DB\Mongo\Mapper::cast |
( |
|
$obj = NULL | ) |
|
Return fields of mapper object as an associative array
- Returns
- array
- Parameters
-
DB\Mongo\Mapper::clear |
( |
|
$key | ) |
|
Delete field
- Returns
- NULL
- Parameters
-
DB\Mongo\Mapper::copyfrom |
( |
|
$key, |
|
|
|
$func = NULL |
|
) |
| |
Hydrate mapper object using hive array variable
- Returns
- NULL
- Parameters
-
DB\Mongo\Mapper::copyto |
( |
|
$key | ) |
|
Populate hive array variable with mapper fields
- Returns
- NULL
- Parameters
-
DB\Mongo\Mapper::count |
( |
|
$filter = NULL , |
|
|
|
$ttl = 0 |
|
) |
| |
Count records that match criteria
- Returns
- int
- Parameters
-
DB\Mongo\Mapper::cursor |
( |
| ) |
|
Return the cursor from last query
- Returns
- object|NULL
DB\Mongo\Mapper::dbtype |
( |
| ) |
|
Return database type
- Returns
- string
DB\Mongo\Mapper::erase |
( |
|
$filter = NULL | ) |
|
Delete current record
- Returns
- bool
- Parameters
-
DB\Mongo\Mapper::exists |
( |
|
$key | ) |
|
Return TRUE if field is defined
- Returns
- bool
- Parameters
-
DB\Mongo\Mapper::factory |
( |
|
$row | ) |
|
|
protected |
Convert array to mapper object
- Returns
- object
- Parameters
-
DB\Mongo\Mapper::fields |
( |
| ) |
|
Return field names
- Returns
- array
DB\Mongo\Mapper::find |
( |
|
$filter = NULL , |
|
|
array |
$options = NULL , |
|
|
|
$ttl = 0 |
|
) |
| |
Return records that match criteria
- Returns
- array
- Parameters
-
$filter | array |
$options | array |
$ttl | int |
DB\Mongo\Mapper::get |
( |
|
$key | ) |
|
Retrieve value of field
- Returns
- scalar|FALSE
- Parameters
-
DB\Mongo\Mapper::insert |
( |
| ) |
|
Insert new record
- Returns
- array
DB\Mongo\Mapper::reset |
( |
| ) |
|
DB\Mongo\Mapper::select |
( |
|
$fields = NULL , |
|
|
|
$filter = NULL , |
|
|
array |
$options = NULL , |
|
|
|
$ttl = 0 |
|
) |
| |
Build query and execute
- Returns
- array
- Parameters
-
$fields | string |
$filter | array |
$options | array |
$ttl | int |
DB\Mongo\Mapper::set |
( |
|
$key, |
|
|
|
$val |
|
) |
| |
Assign value to field
- Returns
- scalar|FALSE
- Parameters
-
DB\Mongo\Mapper::skip |
( |
|
$ofs = 1 | ) |
|
Return record at specified offset using criteria of previous load() call and make it active
- Returns
- array
- Parameters
-
DB\Mongo\Mapper::update |
( |
| ) |
|
Update current record
- Returns
- array
The documentation for this class was generated from the following file: