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, cApiContentVersionCollection, cApiDbfsCollection, cApiFileCollection, cApiActionlogCollection, cApiFileInformationCollection, cApiFrameFileCollection, cApiFrontendGroupCollection, cApiFrontendGroupMemberCollection, cApiFrontendPermissionCollection, cApiFrontendUserCollection, cApiGroupCollection, cApiGroupMemberCollection, cApiGroupPropertyCollection, cApiInUseCollection, cApiAreaCollection, cApiIso3166Collection, cApiIso6392Collection, cApiKeywordCollection, cApiLanguageCollection, cApiLayoutCollection, cApiMailLogCollection, cApiMailLogSuccessCollection, cApiMetaTagCollection, cApiMetaTagVersionCollection, cApiMetaTypeCollection, cApiArticleCollection, cApiModuleCollection, cApiNavMainCollection, cApiNavSubCollection, cApiOnlineUserCollection, cApiPathresolveCacheCollection, cApiPropertyCollection, cApiRightCollection, cApiSearchTrackingCollection, cApiShortUrlCollection, cApiStatCollection, cApiArticleLanguageCollection, cApiSystemPropertyCollection, cApiTemplateCollection, cApiTemplateConfigurationCollection, cApiTypeCollection, cApiUploadCollection, cApiUploadMetaCollection, cApiUserCollection, cApiUserPasswordRequestCollection, cApiUserPropertyCollection, NewsletterCollection, cApiArticleSpecificationCollection, NewsletterJobCollection, NewsletterLogCollection, NewsletterRecipientCollection, NewsletterRecipientGroupCollection, NewsletterRecipientGroupMemberCollection, PifaFieldCollection, PifaFormCollection, PimPluginCollection, PimPluginRelationsCollection, WorkflowActions, cApiCategoryArticleCollection, WorkflowAllocations, WorkflowArtAllocations, 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
|
#
__construct( string $sTable, string $sPrimaryKey )
Constructor to create an instance of this class. |
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
array|boolean
|
|
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
|
|
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
|
__get(),
__set(),
_getPropertiesCollectionInstance(),
_getSecondDBInstance(),
_resetItem(),
_setLoaded(),
_setPrimaryKeyName(),
escape(),
getPrimaryKeyName(),
isLoaded()
|
_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 | 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,
$_loaded,
$_oCache,
$_primaryKeyName,
$_settings,
$db,
$lasterror,
$properties,
$secondDb,
$table
|