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)
stringThe table to use as information source
stringThe primary key to use
_inFilter(mixed $data) : mixed
_onLoad() : \none
Function which is called whenever an item is loaded. Inherited classes should override this function if desired.
\none_outFilter(mixed $data) : mixed
_setMetaObject($objectname)
deleteProperty(string $type, string $name)
stringSpecifies the type
stringSpecifies the name
get(string $field) : mixed
stringSpecifies the field to retrieve
mixedValue of the fieldgetField(string $field) : mixed
stringSpecifies the field to retrieve
mixedValue of the fieldgetMetaObject()
getProperty(string $type, string $name) : boolean
stringSpecifies the type
stringSpecifies the name
booleanValue of the given propertyloadBy(string $field, string $value, bool $bSafe) : bool
stringSpecifies the field
stringSpecifies the value
booluse inFilter or not
boolTrue if the load was successfulloadByPrimaryKey(string $value) : bool
stringSpecifies the primary key value
boolTrue if the load was successfulset(string $field, string $value, $safe)
stringSpecifies the field to set
stringSpecifies the value to set
setField(string $field, string $value, boolean $safe)
stringSpecifies the field to set
stringSpecifies the value to set
booleanSpeficies 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'));
arrayinFilters array with function names
arrayoutFilters array with function names
setProperty(string $type, string $name, string $value)
stringSpecifies the type
stringSpecifies the name
stringSpecifies the value
store()
$_arrInFilters : array
| access | private |
|---|
$_arrOutFilters : array
| access | private |
|---|
$cache : array
| access | private |
|---|
$db : object
| access | private |
|---|
$lasterror : string
| access | private |
|---|
$lifetime : int
| access | private |
|---|
$modifiedValues : array
| access | private |
|---|
$oldPrimaryKey : string
| access | private |
|---|
$primaryKey : object
| access | private |
|---|
$properties : object
| access | private |
|---|
$table : string
| access | private |
|---|
$values : array
| access | private |
|---|
$virgin : boolean
If true, the object is virgin and no operations on it except load-Functions are allowed.
| access | private |
|---|