Class Item Class for database based items
author | Timo A. Hummel <Timo.Hummel@4fb.de> |
---|---|
version | 0.1 |
copyright | four for business 2003 |
Item(string $table, string $primaryKey, $lifetime)
inherited_from | \Item::Item() |
---|
string
The table to use as information source
string
The primary key to use
_inFilter(mixed $data) : mixed
see | \setFilters |
---|---|
access | private |
inherited_from | \Item::_inFilter() |
mixed
Data to filter
mixed
Filtered data_onLoad() : \none
Function which is called whenever an item is loaded. Inherited classes should override this function if desired.
inherited_from | \Item::_onLoad() |
---|
\none
_outFilter(mixed $data) : mixed
see | \setFilters |
---|---|
access | private |
inherited_from | \Item::_outFilter() |
mixed
Data to filter
mixed
Filtered data_setMetaObject($objectname)
inherited_from | \Item::_setMetaObject() |
---|
cApiClientLanguage(integer $idclientslang, integer $idclient, integer $idlang)
integer
idclientslang If specified, load item
integer
idclient If idclient and idlang specified, load item; ignored, if idclientslang specified
integer
idlang If idclient and idlang specified, load item; ignored, if idclientslang specified
deleteProperty($idprop)
get(string $field) : mixed
inherited_from | \Item::get() |
---|
string
Specifies the field to retrieve
mixed
Value of the fieldgetField(string $field) : mixed
inherited_from | \Item::getField() |
---|
string
Specifies the field to retrieve
mixed
Value of the fieldgetMetaObject()
inherited_from | \Item::getMetaObject() |
---|
getProperties()
getPropertiesByType($mType)
getProperty($mType, $mName) : boolean
boolean
Value of the given propertyloadBy(string $field, string $value, bool $bSafe) : bool
inherited_from | \Item::loadBy() |
---|
string
Specifies the field
string
Specifies the value
bool
use inFilter or not
bool
True if the load was successfulloadByPrimaryKey($iID) : bool
bool
True if the load was successfulset(string $field, string $value, $safe)
inherited_from | \Item::set() |
---|
string
Specifies the field to set
string
Specifies the value to set
setField(string $field, string $value, boolean $safe)
inherited_from | \Item::setField() |
---|
string
Specifies the field to set
string
Specifies the value to set
boolean
Speficies if we should translate characters
setFilters(array $arrInFilters, array $arrOutFilters) : void
Examples:
$obj->setFilters(array('addslashes'), array('stripslashes')); $obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));
inherited_from | \Item::setFilters() |
---|
array
inFilters array with function names
array
outFilters array with function names
setProperty(\type $mType, \name $mName, \value $mValue)
\type
mixed Type of the data to store (arbitary data)
\name
mixed Entry name
\value
mixed Value
store()
inherited_from | \Item::store() |
---|
$_arrInFilters : array
access | private |
---|---|
inherited_from | \Item::$$_arrInFilters |
$_arrOutFilters : array
access | private |
---|---|
inherited_from | \Item::$$_arrOutFilters |
$cache : array
access | private |
---|---|
inherited_from | \Item::$$cache |
$db : object
access | private |
---|---|
inherited_from | \Item::$$db |
$idclient
$lasterror : string
access | private |
---|---|
inherited_from | \Item::$$lasterror |
$lifetime : int
access | private |
---|---|
inherited_from | \Item::$$lifetime |
$modifiedValues : array
access | private |
---|---|
inherited_from | \Item::$$modifiedValues |
$oldPrimaryKey : string
access | private |
---|---|
inherited_from | \Item::$$oldPrimaryKey |
$primaryKey : object
access | private |
---|---|
inherited_from | \Item::$$primaryKey |
$properties : object
access | private |
---|---|
inherited_from | \Item::$$properties |
$table : string
access | private |
---|---|
inherited_from | \Item::$$table |
$values : array
access | private |
---|---|
inherited_from | \Item::$$values |
$virgin : boolean
If true, the object is virgin and no operations on it except load-Functions are allowed.
access | private |
---|---|
inherited_from | \Item::$$virgin |