PHP Class DB\Jig\Mapper

Inheritance: extends DB\Cursor
Afficher le fichier Open project: bcosca/fatfree-core Class Usage Examples

Protected Properties

Свойство Type Description
$db
$document
$file
$id

Méthodes publiques

Méthode Description
__construct ( Jig $db, $file ) : void Instantiate class
cast ( $obj = NULL ) : array Return fields of mapper object as an associative array
clear ( $key ) : null Delete field
copyfrom ( $var, $func = NULL ) : null Hydrate mapper object using hive array variable
copyto ( $key ) : null Populate hive array variable with mapper fields
count ( $filter = NULL, $ttl ) : integer Count records that match criteria
dbtype ( ) : string Return database type
erase ( $filter = NULL ) : boolean Delete current record
exists ( $key ) : boolean Return TRUE if field is defined
fields ( ) : array Return field names
find ( $filter = NULL, array $options = NULL, $ttl, $log = TRUE ) : static[] | FALSE Return records that match criteria
get ( $key ) : scalar | FALSE Retrieve value of field
getiterator ( ) : object Retrieve external iterator for fields
insert ( ) : array Insert new record
reset ( ) : null Reset cursor
set ( $key, $val ) : scalar | FALSE Assign value to field
skip ( $ofs = 1 ) : array Return record at specified offset using criteria of previous load() call and make it active
token ( $str ) : string Convert tokens in string expression to variable names
update ( ) : array Update current record

Méthodes protégées

Méthode Description
factory ( $id, $row ) : object Convert array to mapper object

Method Details

__construct() public méthode

Instantiate class
public __construct ( Jig $db, $file ) : void
$db DB\Jig object
$file string
Résultat void

cast() public méthode

Return fields of mapper object as an associative array
public cast ( $obj = NULL ) : array
$obj object
Résultat array

clear() public méthode

Delete field
public clear ( $key ) : null
$key string
Résultat null

copyfrom() public méthode

Hydrate mapper object using hive array variable
public copyfrom ( $var, $func = NULL ) : null
$var array|string
$func callback
Résultat null

copyto() public méthode

Populate hive array variable with mapper fields
public copyto ( $key ) : null
$key string
Résultat null

count() public méthode

Count records that match criteria
public count ( $filter = NULL, $ttl ) : integer
$filter array
$ttl int
Résultat integer

dbtype() public méthode

Return database type
public dbtype ( ) : string
Résultat string

erase() public méthode

Delete current record
public erase ( $filter = NULL ) : boolean
$filter array
Résultat boolean

exists() public méthode

Return TRUE if field is defined
public exists ( $key ) : boolean
$key string
Résultat boolean

factory() protected méthode

Convert array to mapper object
protected factory ( $id, $row ) : object
$id string
$row array
Résultat object

fields() public méthode

Return field names
public fields ( ) : array
Résultat array

find() public méthode

Return records that match criteria
public find ( $filter = NULL, array $options = NULL, $ttl, $log = TRUE ) : static[] | FALSE
$filter array
$options array array
$ttl int
$log bool
Résultat static[] | FALSE

get() public méthode

Retrieve value of field
public get ( $key ) : scalar | FALSE
$key string
Résultat scalar | FALSE

getiterator() public méthode

Retrieve external iterator for fields
public getiterator ( ) : object
Résultat object

insert() public méthode

Insert new record
public insert ( ) : array
Résultat array

reset() public méthode

Reset cursor
public reset ( ) : null
Résultat null

set() public méthode

Assign value to field
public set ( $key, $val ) : scalar | FALSE
$key string
$val scalar
Résultat scalar | FALSE

skip() public méthode

Return record at specified offset using criteria of previous load() call and make it active
public skip ( $ofs = 1 ) : array
$ofs int
Résultat array

token() public méthode

Convert tokens in string expression to variable names
public token ( $str ) : string
$str string
Résultat string

update() public méthode

Update current record
public update ( ) : array
Résultat array

Property Details

$db protected_oe property

protected $db

$document protected_oe property

protected $document

$file protected_oe property

protected $file

$id protected_oe property

protected $id