__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)
string
The table to use as information source
string
The 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 |
mixed
Data to filter
mixed
Filtered datadeleteProperty(string $sType, string $sName) : bool
string
Specifies the type
string
Specifies the name
bool
deletePropertyById(int $idprop) : bool
int
Id of property
bool
escape(string $sString) : string
inherited_from | \Contenido_ItemBaseAbstract::escape() |
---|
string
The string to escape
string
Escaped stringget(string $sField) : mixed
string
Specifies the field to retrieve
mixed
Value of the fieldgetField(string $sField) : mixed
string
Specifies the field to retrieve
mixed
Value of the fieldgetMetaObject()
getProperty(string $sType, string $sName) : mixed
string
Specifies the type
string
Specifies the name
mixed
Value of the given property or falseisLoaded() : bool
bool
loadBy(string $sField, mixed $mValue, bool $bSafe) : bool
string
Specifies the field
mixed
Specifies the value
bool
Use inFilter or not
bool
True if the load was successfulloadByPrimaryKey(string $mValue) : bool
string
Specifies the primary key value
bool
True if the load was successfulloadByRecordSet(array $aRecordSet)
array
The recordset of the item
set(string $sField, string $mValue, bool $bSafe)
string
Field name
string
Value to set
bool
Flag to run defined inFilter on passed value
setField(string $sField, string $mValue, bool $bSafe)
string
Field name
string
Value to set
bool
Flag 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'));
array
Array with function names
array
Array with function names
setProperty(string $sType, string $sName, mixed $mValue) : bool
string
Specifies the type
string
Specifies the name
mixed
Specifies the value
bool
store() : bool
bool
toArray() : array | false
array
false
_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.
string
The where clause like 'idart = 123 AND idlang = 1'
bool
True if the load was successful_onLoad() : void
Inherited classes should override this function if desired.
_outFilter(mixed $mData) : mixed
see | \setFilters |
---|
mixed
Data to filter
mixed
Filtered 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 |
---|