__construct()
_inFilter()
deleteProperty()
deletePropertyById()
escape()
get()
getField()
getMetaObject()
getProperty()
isLoaded()
loadBy()
loadByPrimaryKey()
loadByRecordSet()
set()
setField()
setFilters()
setProperty()
store()
toArray()
toObject()
_getPropertiesCollectionInstance()
_getSecondDBInstance()
_loadByWhereClause()
_onLoad()
_outFilter()
_setMetaObject()
$primaryKey
$values
$virgin
$_arrInFilters
$_arrOutFilters
$_className
$_metaObject
$_oCache
$_settings
$cache
$db
$lasterror
$lifetime
$modifiedValues
$oldPrimaryKey
$properties
$secondDb
$table
Class Item Abstract class for database based items.
Base class with common features for database based items and item collections.
| author | Timo A. Hummel <Timo.Hummel@4fb.de> |
|---|---|
| author | Murat Purc |
| version | 0.3 |
| copyright | four for business 2003 |
__construct(string $sTable, string $sPrimaryKey, int $iLifetime)
stringThe table to use as information source
stringThe primary key to use
int
\Contenido_ItemException |
If table name or primary key is not set |
|---|
_inFilter(mixed $mData) : mixed
| see | \setFilters |
|---|---|
| todo | This method is used from public scope, but it should be protected |
mixedData to filter
mixedFiltered datadeleteProperty(string $sType, string $sName) : bool
stringSpecifies the type
stringSpecifies the name
booldeletePropertyById(int $idprop) : bool
intId of property
boolescape(string $sString) : string
| inherited_from | \Contenido_ItemBaseAbstract::escape() |
|---|
stringThe string to escape
stringEscaped stringget(string $sField) : mixed
stringSpecifies the field to retrieve
mixedValue of the fieldgetField(string $sField) : mixed
stringSpecifies the field to retrieve
mixedValue of the fieldgetMetaObject()
getProperty(string $sType, string $sName) : mixed
stringSpecifies the type
stringSpecifies the name
mixedValue of the given property or falseisLoaded() : bool
boolloadBy(string $sField, mixed $mValue, bool $bSafe) : bool
stringSpecifies the field
mixedSpecifies the value
boolUse inFilter or not
boolTrue if the load was successfulloadByPrimaryKey(string $mValue) : bool
stringSpecifies the primary key value
boolTrue if the load was successfulloadByRecordSet(array $aRecordSet)
arrayThe recordset of the item
set(string $sField, string $mValue, bool $bSafe)
stringField name
stringValue to set
boolFlag to run defined inFilter on passed value
setField(string $sField, string $mValue, bool $bSafe)
stringField name
stringValue to set
boolFlag to run defined inFilter on passed value
setFilters(array $aInFilters, array $aOutFilters) : void
Examples:
$obj->setFilters(array('addslashes'), array('stripslashes'));
$obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));
arrayArray with function names
arrayArray with function names
setProperty(string $sType, string $sName, mixed $mValue) : bool
stringSpecifies the type
stringSpecifies the name
mixedSpecifies the value
boolstore() : bool
booltoArray() : array | false
arrayfalse
_getPropertiesCollectionInstance() : \PropertyCollection
| inherited_from | \Contenido_ItemBaseAbstract::_getPropertiesCollectionInstance() |
|---|
_getSecondDBInstance() : \DB_Contenido
_loadByWhereClause(string $sWhere) : bool
This function is expensive, since it executes allways a query to the database to retrieve the primary key, even if the record set is aleady cached. NOTE: Passed value has to be escaped before. This will not be done by this function.
stringThe where clause like 'idart = 123 AND idlang = 1'
boolTrue if the load was successful_onLoad() : void
Inherited classes should override this function if desired.
_outFilter(mixed $mData) : mixed
| see | \setFilters |
|---|
mixedData to filter
mixedFiltered data_setMetaObject($sObjectName)
$primaryKey : string
| inherited_from | \Contenido_ItemBaseAbstract::$$primaryKey |
|---|
$values : array
$virgin : bool
| inherited_from | \Contenido_ItemBaseAbstract::$$virgin |
|---|
$_arrInFilters : array
$_arrOutFilters : array
$_className : string
| inherited_from | \Contenido_ItemBaseAbstract::$$_className |
|---|
$_oCache : \Contenido_ItemCache
| inherited_from | \Contenido_ItemBaseAbstract::$$_oCache |
|---|
$_settings : array
| inherited_from | \Contenido_ItemBaseAbstract::$$_settings |
|---|
$cache : array
| inherited_from | \Contenido_ItemBaseAbstract::$$cache |
|---|
$db : \DB_Contenido
| inherited_from | \Contenido_ItemBaseAbstract::$$db |
|---|
$lasterror : string
| inherited_from | \Contenido_ItemBaseAbstract::$$lasterror |
|---|
$lifetime : int
| inherited_from | \Contenido_ItemBaseAbstract::$$lifetime |
|---|
$modifiedValues : array
$oldPrimaryKey : string
$properties : \PropertyCollection
| inherited_from | \Contenido_ItemBaseAbstract::$$properties |
|---|
$secondDb : \DB_Contenido
| inherited_from | \Contenido_ItemBaseAbstract::$$secondDb |
|---|
$table : string
| inherited_from | \Contenido_ItemBaseAbstract::$$table |
|---|