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, cApiSearchTrackingCollection, cApiShortUrlCollection, cApiStatCollection, cApiSystemPropertyCollection, cApiTemplateCollection, cApiArticleLanguageCollection, cApiTemplateConfigurationCollection, cApiTypeCollection, cApiUploadCollection, cApiUploadMetaCollection, cApiUserCollection, cApiUserPasswordRequestCollection, cApiUserPropertyCollection, NewsletterCollection, NewsletterJobCollection, NewsletterLogCollection, cApiArticleSpecificationCollection, NewsletterRecipientCollection, NewsletterRecipientGroupCollection, NewsletterRecipientGroupMemberCollection, PifaFieldCollection, PifaFormCollection, PimPluginCollection, PimPluginRelationsCollection, WorkflowActions, WorkflowAllocations, WorkflowArtAllocations, cApiCategoryArticleCollection, WorkflowItems, Workflows, 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
|
|
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( string $sClassName )
Fetches the resultset related to current loaded primary key as an object |
public
array
|
#
fetchTable( array $aFields = array(), array $aObjects = array() )
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
array
|
|
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(),
_resetItem(),
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. Contains all result items. |
|
protected
|
$_driver
GenericDB driver object |
|
protected
array
|
$_collectionCache
List of instances of ItemCollection implementations |
#
array()
|
protected
string
|
$_itemClass
Single item class |
|
protected
object
|
$_iteratorItem
Iterator object for the next() method |
|
protected
array
|
$_JoinPartners
Reverse join partners for this data object |
#
array()
|
protected
array
|
$_forwardJoinPartners
Forward join partners for this data object |
|
protected
array
|
$_whereRestriction
Where restrictions for the query |
|
protected
array
|
$_innerGroupConditions
Inner group conditions |
#
array()
|
protected
array
|
$_groupConditions
Group conditions |
|
protected
array
|
$_resultFields
Result fields for the query |
#
array()
|
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
Flag to select all fields in a query. Reduces the number of queries send to the database. |
#
false
|
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
|