Class Contenido_ItemBaseAbstract.

Base class with common features for database based items and item collections.

author Murat Purc
version 0.2
copyright four for business AG <www.4fb.de>

 Methods

Escape string for using in SQL-Statement.

escape(string $sString) : string

Parameters

$sString

string

The string to escape

Returns

stringEscaped string

Sets some common properties

__construct(string $sTable, string $sPrimaryKey, string $sClassName, int $iLifetime) 

Parameters

$sTable

string

Name of table

$sPrimaryKey

string

Primary key of table

$sClassName

string

Name of parent class

$iLifetime

int

Lifetime of the object in seconds (NOT USED!)

Exceptions

\Contenido_ItemException If table name or primary key is not set

Returns properties instance, instantiates it if not done before.

_getPropertiesCollectionInstance() : \PropertyCollection

Returns the second database instance, usable to run additional statements without losing current query results.

_getSecondDBInstance() : \DB_Contenido

Returns

 Properties

 

Storage of the primary key

$primaryKey : string

todo remove access from public
 

Checks for the virginity of created objects. If true, the object is virgin and no operations on it except load-Functions are allowed.

$virgin : bool

todo remove access from public
 

Classname of current instance

$_className : string

 

Item cache instance

$_oCache : \Contenido_ItemCache

 

GenericDB settings, see $cfg['sql']

$_settings : array

 

Cache the result items FIXME seems to not used, remove it!

$cache : array

 

Database instance, contains the database object

$db : \DB_Contenido

 

Storage of the last occured error

$lasterror : string

 

Lifetime of results/created objects? FIXME Not used at the moment!

$lifetime : int

 

Property collection instance

$properties : \PropertyCollection

 

Second DB instance, is required for some additional queries without losing an current existing query result.

$secondDb : \DB_Contenido

 

Storage of the source table to use for the information

$table : string