Class ItemCollection
Class ItemCollection Abstract class for database based item collections.
- cGenericDb
- cItemBaseAbstract
- ItemCollection
Direct known subclasses
ArticleForumCollection, cApiActionCollection, cApiCategoryTreeCollection, cApiClientCollection, cApiClientLanguageCollection, cApiCommunicationCollection, cApiContainerCollection, cApiContainerConfigurationCollection, cApiContentCollection, cApiDbfsCollection, cApiFileCollection, cApiFileInformationCollection, cApiActionlogCollection, cApiFrameFileCollection, cApiFrontendGroupCollection, cApiFrontendGroupMemberCollection, cApiFrontendPermissionCollection, cApiFrontendUserCollection, cApiGroupCollection, cApiGroupMemberCollection, cApiGroupPropertyCollection, cApiInUseCollection, cApiIso3166Collection, cApiAreaCollection, cApiIso6392Collection, cApiKeywordCollection, cApiLanguageCollection, cApiLayoutCollection, cApiMailLogCollection, cApiMailLogSuccessCollection, cApiMetaTagCollection, cApiMetaTypeCollection, cApiModuleCollection, cApiNavMainCollection, cApiArticleCollection, cApiNavSubCollection, cApiOnlineUserCollection, cApiPathresolveCacheCollection, cApiPropertyCollection, cApiRightCollection, cApiShortUrlCollection, cApiStatCollection, cApiSystemPropertyCollection, cApiTemplateCollection, cApiTemplateConfigurationCollection, cApiArticleLanguageCollection, cApiTypeCollection, cApiUploadCollection, cApiUploadMetaCollection, cApiUserCollection, cApiUserPropertyCollection, NewsletterCollection, NewsletterJobCollection, NewsletterLogCollection, NewsletterRecipientCollection, NewsletterRecipientGroupCollection, cApiArticleSpecificationCollection, NewsletterRecipientGroupMemberCollection, PifaFieldCollection, PifaFormCollection, PimPluginCollection, PimPluginRelationsCollection, WorkflowActions, WorkflowAllocations, WorkflowArtAllocations, WorkflowItems, Workflows, cApiCategoryArticleCollection, WorkflowTasks, WorkflowUserSequences, cApiCategoryCollection, cApiCategoryLanguageCollectionPackage: Core\GenericDB
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Author: Murat Purc <murat@purc.de>
Located at classes/genericdb/class.item.collection.php
public
|
|
public
|
#
ItemCollection( mixed $sTable, mixed $sPrimaryKey, mixed $iLifetime = 10 )
Constructor function for downwards compatibility |
protected
|
|
protected
|
|
protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
deleteWhere( string $sField, mixed $mRestriction, string $sOperator = '=' )
Removes a previous set where clause (@see ItemCollection::setWhere). |
public
|
#
setWhereGroup( string $sGroup, string $sField, mixed $mRestriction, string $sOperator = '=' )
Restricts a query with a where clause, groupable |
public
|
#
deleteWhereGroup( string $sGroup, string $sField, mixed $mRestriction, string $sOperator = '=' )
Removes a previous set groupable where clause (@see ItemCollection::setWhereGroup). |
public
|
#
setInnerGroupCondition( string $sGroup, string $sCondition = 'AND' )
Defines how relations in one group are linked each together |
public
|
#
setGroupCondition( string $sGroup1, string $sGroup2, string $sCondition = 'AND' )
Defines how groups are linked to each other |
protected
array
|
|
protected
array
|
|
protected
array
|
|
protected
array
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
public
boolean
|
|
public
boolean
|
#
flexSelect( string $sDistinct = '', string $sFrom = '', string $sWhere = '', string $sGroupBy = '', string $sOrderBy = '', string $sLimit = '' )
Selects all entries from the database. Objects are loaded using their primary key. |
public
boolean
|
|
public
|
|
public
|
#
fetchObject(
Fetches the resultset related to current loaded primary key as an object |
public
|
#
fetchTable( array $aFields = array(), array $aObjects = array() )
Prelimary documentation $aFields = array with the fields to fetch. Notes: If the array contains keys, the key will be used as alias for the field. Example: array('id' => 'idcat') will put 'idcat' into field 'id' $aObjects = array with the objects to fetch. Notes: If the array contains keys, the key will be used as alias for the object. If you specify more than one object with the same key, the array will be multi-dimensional. |
public
array
|
|
protected
|
|
public
integer
|
|
public
|
|
public
|
|
public
|
#
createNewItem( string|array $data = NULL )
Creates a new item in the table and loads it afterwards. |
public
object
|
|
public
array
|
#
getIdsByWhereClause( string $sWhere )
Returns all ids of recordsets in the table matching the rules in the passed where clause. |
public
array
|
#
getFieldsByWhereClause( array $aFields, string $sWhere )
Returns all specified fields of recordsets in the table matching the rules in the passed where clause. |
public
array
|
|
public
boolean
|
|
public
integer
|
#
deleteByWhereClause( string $sWhere )
Deletes all found items in the table matching the rules in the passed where clause. Deletes also cached e entries and any existing properties. |
public
integer
|
|
protected
boolean
|
|
protected
integer
|
#
_deleteMultiple( array $aIds )
Deletes all items in the table, deletes also existing cache entries and properties of the item. |
public
array
|
_getPropertiesCollectionInstance(),
_getSecondDBInstance(),
escape()
|
_executeCallbacks(),
register(),
unregister()
|
CREATE_BEFORE,
CREATE_FAILURE,
CREATE_SUCCESS,
DELETE_BEFORE,
DELETE_FAILURE,
DELETE_SUCCESS,
STORE_BEFORE,
STORE_FAILURE,
STORE_SUCCESS
|
protected
string
|
$objects |
|
#
Storage of all result items |
protected
|
$_driver |
|
#
GenericDB driver object |
protected
array
|
$_collectionCache | array() |
#
List of instances of ItemCollection implementations |
protected
string
|
$_itemClass |
|
#
Single item class |
protected
object
|
$_iteratorItem |
|
#
Iterator object for the next() method |
protected
array
|
$_JoinPartners | array() |
#
Reverse join partners for this data object |
protected
array
|
$_forwardJoinPartners |
|
#
Forward join partners for this data object |
protected
array
|
$_whereRestriction |
|
#
Where restrictions for the query |
protected
array
|
$_innerGroupConditions | array() |
#
Inner group conditions |
protected
array
|
$_groupConditions |
|
#
Group conditions |
protected
array
|
$_resultFields | array() |
#
Result fields for the query |
protected
string
|
$_encoding |
|
#
Encoding |
protected
object
|
$_itemClassInstance |
|
#
Item class instance |
protected
array
|
$_aOperators |
|
#
Stores all operators which are supported by GenericDB Unsupported operators are passed trough as-is. |
protected
boolean
|
$_bAllMode | false |
#
Flag to select all fields in a query. Reduces the number of queries send to the database. |
protected
array
|
$_where |
|
#
Array with where conditions |
protected
string
|
$_order |
|
#
Order mode with direction |
protected
integer
|
$_limitStart |
|
#
Starting limit |
protected
integer
|
$_limitCount |
|
#
Amount of items for limit |
protected
string
|
$_lastSQL |
|
#
Last SQL statement |
protected
array
|
$_links |
|
#
Array with linked tables |
$_className,
$_oCache,
$_settings,
$db,
$lasterror,
$primaryKey,
$properties,
$secondDb,
$table,
$virgin
|