Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
eZPersistentObject Class Reference
Inheritance diagram for eZPersistentObject:

## Public Member Functions
| __construct ( $row=null)
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| store ( $fieldFilters=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
static | fetchObjectList ( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | definition ()
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Static Protected Member Functions
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 32 of file ezpersistentobject.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZPersistentObject::__construct | ( |  | $row = `null` | ) |

Initializes the object with the $row.

It will try to set each field taken from the database row. Calls fill to do the job. If $row is an integer, it will try to fetch it from the database using it as the unique ID.

Parameters

  int | array | $row |

Reimplemented in eZNotificationEvent, eZRole, eZContentObjectVersion, eZContentObjectTreeNode, eZUser, eZWaitUntilDateValue, eZWorkflowEvent, eZVatRule, eZURLAliasML, eZSection, eZPolicyLimitation, eZPolicy, eZPathElement, eZOrderStatusHistory, eZOrder, eZNodeAssignment, eZInformationCollectionAttribute, eZContentObjectAttribute, eZContentObject, eZContentClassAttribute, and eZContentClass.

Definition at line 52 of file ezpersistentobject.php.

References fill().

Referenced by eZPersistentObject().

## Member Function Documentation

## ◆ attribute()

eZPersistentObject::attribute | ( |  | $attr,
|  |  | $noFunction = `false`
| ) |  |

Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.

Parameters

  string | $attr |
  bool | $noFunction |

Returns
  mixed

Reimplemented in eZWorkflowEvent, and eZContentObjectAttribute.

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 1329 of file ezpersistentobject.php.

References definition(), and eZDebug\writeError().

Referenced by eZNotificationEvent\__construct(), eZPolicy\accessArray(), eZRole\accessArray(), eZRole\accessArrayByUserID(), eZOrder\activate(), eZContentObjectTreeNode\addChild(), eZNotificationCollection\addItem(), eZContentObject\addLocation(), eZContentObjectTreeNode\adjustPathElement(), eZContentObject\allowedAssignSectionList(), eZContentObject\allowedAssignStateIDList(), eZContentObject\allowedAssignStateList(), eZPolicyLimitation\allValues(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZPolicyLimitation\allValuesAsString(), eZContentCacheManager\appendAdditionalNodeIDs(), eZContentClassGroup\appendClass(), eZSection\applyTo(), eZURLWildcard\asArray(), eZContentObject\assignedNodes(), eZContentObjectVersion\assignToNode(), eZRole\assignToUser(), eZProductCollectionItem\calculatePriceWithOptions(), eZUser\canAssignSectionToObject(), eZUser\canAssignToObjectSectionList(), eZSection\canBeRemoved(), eZOrder\canModifyStatus(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectVersion\checkAccess(), eZWaitUntilDateValue\classAttributeName(), eZContentObject\classListFromPolicy(), eZContentObjectTreeNode\classListFromPolicy(), eZWaitUntilDateValue\className(), eZWorkflow\cleanupWorkFlowProcess(), eZContentObjectTreeNode\clearViewCacheForSubtree(), eZNodeAssignment\cloneNodeAssignment(), eZContentObject\contentActionList(), eZInformationCollectionAttribute\contentClassAttribute(), eZContentObjectVersion\contentObject(), eZInformationCollectionAttribute\contentObject(), eZInformationCollectionAttribute\contentObjectAttribute(), eZNodeviewfunctions\contentViewGenerate(), eZContentObject\copy(), eZPolicyLimitationValue\copy(), eZPolicyLimitation\copy(), eZPolicy\copy(), eZRole\copy(), eZRole\copyPolicies(), eZContentObject\copyVersion(), eZPDFExport\countGeneratingOnceExports(), eZVatRule\country(), eZContentObject\createInitialVersion(), eZContentObject\createNewVersion(), eZContentObject\createNodeAssignment(), eZCollaborationItem\createNotificationEvent(), eZBasket\createOrder(), eZPolicy\createTemporaryCopy(), eZRole\createTemporaryVersion(), eZInformationCollection\creator(), eZOrder\currencyCode(), eZContentObject\currentVersion(), eZContentObjectTreeNode\dataMap(), eZObjectRelationType\deleteNotVersionedStoredClassAttribute(), eZObjectRelationListType\deleteNotVersionedStoredClassAttribute(), eZPDFExport\exportClassesArray(), eZUser\failedLoginAttempts(), eZTrigger\fetchAllowedWorkflows(), eZContentObject\fetchClassAttributes(), eZContentObject\fetchDataMap(), eZContentClass\fetchGroupIDList(), eZContentClass\fetchGroupList(), eZRSSExport\fetchImageURL(), eZContentClass\fetchMatchGroupIDList(), eZContentBrowseBookmark\fetchNode(), eZContentBrowseRecent\fetchNode(), eZContentObjectTreeNode\fetchParent(), eZContentObjectTreeNode\fetchPath(), eZURLAliasML\fetchPathByActionList(), eZPDFExport\filepath(), eZUser\generateAccessArray(), eZRSSExport\generateFeed(), eZNodeviewfunctions\generateNodeViewData(), eZRSSExportItem\getAttributeMappings(), eZContentObjectTreeNode\getName(), eZNodeAssignment\getParentNode(), eZNodeAssignment\getParentObject(), eZCollaborationItem\handler(), eZContentObjectTreeNode\hasCurrentSubtreeLimitation(), eZUser\hasStoredLogin(), eZContentObject\hasVisibleNode(), eZContentObjectTreeNode\hideSubTree(), eZRSSImport\importDescription(), eZViewCounter\increase(), eZContentClass\inGroup(), eZWorkflow\ingroupIDList(), eZWorkflow\ingroupList(), eZContentClassAttribute\initializeObjectAttributes(), eZContentClassAttribute\instantiate(), eZContentClass\instantiate(), eZContentClassAttribute\instantiateTemporary(), eZContentObject\isAlwaysAvailable(), eZUser\isAnonymous(), eZUser\isEnabled(), eZUser\isLocked(), eZTemplateRoleOperator\isMemberOfRole(), eZTemplateRoleOperator\isMemberOfRoleId(), eZContentObjectTreeNode\isNodeTrashAllowed(), eZNotificationCollection\itemCount(), eZNotificationCollection\items(), eZBasket\itemsInfo(), eZNotificationCollection\itemsToSend(), eZContentObjectVersion\languageMask(), eZPolicyLimitation\limitArray(), eZPolicy\limitationList(), eZUser\limitList(), eZOperationMemento\mainMemento(), eZContentObject\mainNode(), eZContentObject\mainNodeID(), eZContentObjectVersion\mainParentNodeID(), eZTemplateRoleOperator\memberOfRoleByUserId(), eZBinaryFile\mimeTypeCategory(), eZMedia\mimeTypeCategory(), eZBinaryFile\mimeTypePart(), eZMedia\mimeTypePart(), eZTopMenuOperator\modify(), eZContentObjectVersion\name(), eZContentObject\name(), eZContentObject\names(), eZSubtreeNotificationRule\node(), eZContentObjectVersion\nodeAssignments(), eZContentObjectVersion\nonTranslatableAttributesToUpdate(), eZContentObjectTreeNode\object(), eZProductCollectionItem\optionList(), eZOrder\orderItems(), eZContentObjectTrashNode\originalParent(), eZContentObjectTrashNode\originalParentPathIdentificationString(), eZWorkflowProcess\parameterList(), eZContentObjectVersion\parentNodes(), eZContentObjectTreeNode\pathArray(), eZContentObjectTreeNode\pathWithNames(), eZPolicyLimitation\policy(), eZRole\policyList(), eZOrderItem\priceExVAT(), eZOrderItem\priceIncVAT(), eZVatRule\productCategoriesIDs(), eZVatRule\productCategoriesNames(), eZVatRule\productCategoriesString(), eZBasket\productCollection(), eZOrder\productCollection(), eZNodeAssignment\purge(), eZContentObject\purge(), eZCache\purgeImageAliasForObject(), eZContentObjectVersion\relatedContentObjectArray(), eZContentClass\remoteID(), eZContentObject\remoteID(), eZContentObjectTreeNode\remoteID(), eZContentClass\removableInformation(), eZPDFExport\remove(), remove(), eZContentObjectVersion\removeAssignment(), eZOrder\removeCollection(), eZBasket\removeItem(), eZContentObjectTreeNode\removeNodeFromTree(), eZRole\removePolicies(), eZPolicy\removeThis(), eZContentObject\removeThis(), eZContentClassAttribute\removeThis(), eZContentObjectTreeNode\removeThis(), eZPolicyLimitation\removeThis(), eZProductCollectionItem\removeThis(), eZRole\removeThis(), eZWorkflowProcess\removeThis(), eZContentObjectVersion\removeTranslation(), eZContentClass\removeTranslation(), eZContentObject\removeTranslation(), eZContentObject\rename(), eZContentObject\restoreObjectAttributes(), eZContentObjectVersion\reverseRelatedObjectList(), eZRole\revertFromTemporaryVersion(), eZUser\roleIDList(), eZUser\roles(), eZRSSExport\rssXmlContent(), eZWorkflowProcess\run(), eZPolicy\saveTemporary(), eZContentObject\sectionIdentifier(), eZContentObjectTreeNode\serialize(), eZContentObjectVersion\serialize(), eZContentObject\serialize(), eZUserType\serializeDraft(), eZContentObjectVersion\setAlwaysAvailableLanguageID(), eZContentClass\setAlwaysAvailableLanguageID(), eZContentObject\setAlwaysAvailableLanguageID(), eZCollaborationItem\setIsActive(), eZCollaborationItem\setLastRead(), eZContentClass\setName(), eZContentObject\setName(), eZWorkflowProcess\setParameters(), eZContentObjectTreeNode\sortArray(), eZOrder\statusModificationList(), eZUser\store(), eZContentClassAttribute\store(), eZContentObjectVersion\store(), eZVatRule\store(), eZPDFExport\store(), eZRSSExport\store(), eZBinaryFile\storedFileInfo(), eZMedia\storedFileInfo(), eZContentClass\storeVersioned(), eZContentClassAttribute\storeVersioned(), eZContentObjectTreeNode\subTree(), eZContentObjectTreeNode\subTreeCount(), eZContentObjectTreeNode\subtreeSoleNodeCount(), eZNodeAssignment\tempNode(), eZBasket\type(), eZContentObjectTreeNode\unhideSubTree(), eZContentObjectVersion\unpublish(), eZContentFunctions\updateAndPublishObject(), eZContentObjectTreeNode\updateAndStoreModified(), eZContentObjectTreeNode\updatePathIdentificationString(), eZBasket\updatePrices(), eZContentObjectTreeNode\updateSubTreePath(), eZCollaborationNotificationRule\user(), eZPolicyLimitation\valueList(), eZVatRule\vatTypeName(), eZVatRule\vatTypeObject(), eZProductCollectionItem\verify(), eZContentObject\versionLanguageName(), eZContentObjectVersion\versionName(), and eZContentObjectTreeNode\viewCount().

## ◆ attributes()

eZPersistentObject::attributes | ( |  | ) |

Returns the attributes for this object, taken from the definition fields and function attributes.

See also
  eZPersistentObject::definition()

Returns
  array

Reimplemented in eZWorkflowEvent.

Definition at line 1292 of file ezpersistentobject.php.

References definition().

## ◆ conditionText()

static eZPersistentObject::conditionText | ( |  | $conditions | ) |
| static

Calls conditionTextByRow with an empty row and $conditions.

Parameters

  array | $conditions |

Returns
  string

Definition at line 628 of file ezpersistentobject.php.

References conditionTextByRow().

Referenced by fetchObjectList(), newObjectOrder(), removeObject(), and storeObject().

## ◆ conditionTextByRow()

static eZPersistentObject::conditionTextByRow | ( |  | $conditions,
|  |  | $row
| ) |  |
| static

Generates an SQL sentence from the conditions $conditions and row data $row.

If $row is empty (or null) it uses the condition data instead of row data.

Parameters

  array | $conditions |
  array | null | $row |

Returns
  string

Definition at line 643 of file ezpersistentobject.php.

References count(), eZDB\instance(), and eZDebug\writeError().

Referenced by conditionText(), and reorderObject().

## ◆ count()

static eZPersistentObject::count | ( |  | $def,
|  |  | $conds = `null`,
|  |  | $field = `null`
| ) |  |
| static

Fetches the number of rows by using the object definition.

Uses fetchObjectList for the actual SQL handling. See eZPersistentObject::fetchObjectList() for a full description of the input parameters.

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  array | null | $conds |
  string | null | $field |

Returns
  int

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 187 of file ezpersistentobject.php.

References fetchObjectList().

Referenced by eZContentLanguage\addLanguage(), eZContentObjectTreeNode\adjustPathElement(), eZContentObject\allowedAssignStateIDList(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZContentObject\appendInputRelationList(), eZRole\appendPolicy(), eZRole\assignToUser(), eZProductCollectionItem\calculatePriceWithOptions(), eZContentObjectTreeNode\calendar(), eZSection\canBeRemoved(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectVersion\checkAccess(), eZContentObject\checkGroupLimitationAccess(), eZSubtreeNotificationRule\checkObjectAccess(), eZContentClassClassGroup\classInGroup(), eZContentObject\className(), eZBasket\cleanup(), eZOrder\cleanup(), eZWishList\cleanup(), eZRole\cleanupByNode(), eZBasket\cleanupExpired(), eZProductCollectionItem\cleanupList(), eZOrder\cleanupOrder(), eZContentObject\clearCache(), eZContentObjectTreeNode\clearViewCacheForSubtree(), conditionTextByRow(), eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZContentObjectTreeNode\createClassFilteringSQLString(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZContentBrowseRecent\createNew(), eZContentObject\createNewVersion(), eZContentObjectTreeNode\createNodesConditionSQLStringFromPath(), eZUser\createPassword(), eZContentObjectTreeNode\createPathConditionAndNotEqParentSQLStrings(), eZContentObjectTreeNode\createPermissionCheckingSQL(), eZContentObjectTreeNode\createSortingSQLStrings(), eZURLWildcard\createWildcardsIndex(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZOrder\customerList(), eZRSSImport\destinationPath(), eZContentObject\exists(), eZContentClass\exists(), eZISBNGroupRange\extractGroup(), eZISBNRegistrantRange\extractRegistrant(), eZContentObject\fetch(), eZContentClass\fetch(), eZContentObjectTreeNode\fetch(), eZContentObjectTreeNode\fetchAliasesFromNodeList(), eZContentClass\fetchAttributeByIdentifier(), eZContentObject\fetchAttributesByIdentifier(), eZPendingActions\fetchByAction(), eZURLAliasML\fetchByAction(), eZISBNGroup\fetchByGroup(), eZContentClass\fetchByIdentifier(), eZURLAliasML\fetchByPath(), eZContentObject\fetchByRemoteID(), eZContentClass\fetchByRemoteID(), eZRole\fetchByUser(), eZInformationCollection\fetchCollectionsList(), eZWorkflow\fetchEventIndexed(), eZContentObject\fetchForUpdate(), eZImageFile\fetchImageAttributesByFilepath(), eZContentClassName\fetchList(), eZCollaborationItem\fetchListTool(), eZContentObjectTreeNode\fetchNode(), eZURLAliasML\fetchNodeIDByPath(), eZRSSExportItem\fetchNodeList(), fetchObjectList(), eZURLAliasML\fetchPathByActionList(), eZContentObjectVersion\fetchUserDraft(), eZUser\fetchUserGroupClassNames(), eZSubtreeNotificationRule\fetchUserList(), eZContentObjectVersion\fetchVersionForUpdate(), eZContentObject\fillNodeListAttributes(), eZPolicyLimitation\findByType(), eZContentObjectTreeNode\findMainNode(), eZURLAliasML\findUniqueText(), eZContentObject\fixReverseRelations(), eZRSSExport\generateFeed(), eZRSSExportItem\getAttributeMappings(), eZContentObjectTreeNode\getName(), eZLDAPUser\getNodeAssignmentsForGroupName(), eZContentObjectTreeNode\getObjectIdsInNodeSubTree(), eZURLAliasML\getPath(), eZPathElement\getPath(), eZPathElement\getPathArray(), eZInformationCollection\getSortArrayFromParam(), eZLDAPUser\goAndPublishGroups(), eZURL\handleList(), eZContentObjectVersion\hasConflicts(), eZRole\hasPolicy(), eZContentObject\hasRemainingVersions(), eZRSSExport\imagePath(), eZBasket\isEmpty(), eZContentClass\isRemovable(), eZURLAliasML\languageScore(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), eZContentObjectTreeNode\move(), newObjectOrder(), eZOrder\orderInfo(), eZOrder\orderTotalExVAT(), eZOrder\orderTotalIncVAT(), eZContentObjectTrashNode\originalParent(), eZContentObjectTreeNode\pathWithNames(), eZContentObject\previousVersion(), eZContentLanguage\prioritizedLanguagesByLocaleList(), eZOrder\productList(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), eZContentObject\purge(), eZNodeAssignment\purgeByID(), eZContentObject\relatedObjectCount(), eZContentObject\relatedObjects(), eZContentClass\removableInformation(), eZNodeAssignment\removeByID(), eZURLWildcard\removeByIDs(), eZPolicyLimitationValue\removeByValue(), eZContentObjectTreeNode\removeNodeFromTree(), eZRole\removePolicy(), eZObjectRelationListType\removeRelationObject(), eZURLAliasML\removeSingleEntry(), eZContentObjectTreeNode\removeSubtrees(), eZContentObject\removeThis(), eZContentObjectVersion\removeVersions(), eZContentObject\rename(), reorderObject(), eZVatType\resetToDefaultInProducts(), eZURLAliasML\reverseTranslate(), eZRole\roleCount(), eZTrigger\runTrigger(), eZContentObjectVersion\serialize(), eZNodeAssignment\setNewMainAssignment(), eZRSSExportItem\sourcePath(), eZContentLanguage\sqlFilter(), eZOrder\statusModificationList(), storeObject(), eZURLAliasML\storePath(), eZContentClass\storeVersioned(), eZCollaborationGroup\subTree(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeCountByNodeID(), eZContentObjectTreeNode\subTreeMultiPaths(), eZContentObjectTreeNode\subtreeSoleNodeCount(), eZContentObjectVersion\tempMainNode(), eZContentLanguage\topPriorityLanguageByLocaleList(), eZURLAliasML\translate(), eZBasket\type(), eZContentObjectVersion\unpublish(), eZContentObjectVersion\unserialize(), eZContentObjectTreeNode\updateAndStoreModified(), eZContentObjectTreeNode\updateSubTreePath(), eZURL\url(), eZURL\urlByMD5(), eZURL\urlByURL(), and eZContentObject\versionLanguageName().

## ◆ definition()

static eZPersistentObject::definition | ( |  | ) |
| static

Returns the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

- fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
- keys: an array of fields which is used for uniquely identifying the object in the table.
- function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
- set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
- increment_key: the field which is incremented on table inserts.
- class_name: the classname which is used for instantiating new objecs when fetching from the database.
- sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
- name: the name of the database table

Example: `public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }`

Returns
  array

Reimplemented in eZOperationMemento, eZWaitUntilDateValue, eZSubtreeNotificationRule, eZGeneralDigestUserSettings, eZCollaborationNotificationRule, eZNotificationEvent, eZNotificationCollectionItem, eZNotificationCollection, eZWorkflowProcess, eZWorkflowGroupLink, eZWorkflowGroup, eZWorkflowEvent, eZWorkflow, eZWishList, eZViewCounter, eZVatType, eZVatRule, eZUserDiscountRule, eZURLWildcard, eZURLAliasML, eZTrigger, eZTipafriendRequest, eZTipafriendCounter, eZSiteData, eZSection, eZRSSImport, eZRSSExportItem, eZRSSExport, eZRole, eZProductCollectionItemOption, eZProductCollectionItem, eZProductCollection, eZProductCategory, eZPolicyLimitationValue, eZPolicyLimitation, eZPolicy, eZPendingActions, eZPDFExport, eZPathElement, eZOrderStatusHistory, eZOrderStatus, eZOrderItem, eZOrder, eZNodeAssignment, eZInformationCollectionAttribute, eZInformationCollection, eZDiscountSubRuleValue, eZDiscountSubRule, eZDiscountRule, eZContentObjectVersion, eZContentObjectTreeNode, eZContentObjectTrashNode, eZContentObjectAttribute, eZContentObject, eZContentLanguage, eZContentClassName, eZContentClassGroup, eZContentClassClassGroup, eZContentClassAttribute, eZContentClass, eZContentBrowseRecent, eZContentBrowseBookmark, eZCollaborationSimpleMessage, eZCollaborationProfile, eZCollaborationItemStatus, eZCollaborationItemParticipantLink, eZCollaborationItemMessageLink, eZCollaborationItemGroupLink, eZCollaborationItem, eZCollaborationGroup, eZBasket, eZUserSetting, eZUserAccountKey, eZUser, eZForgotPassword, eZURLObjectLink, eZURL, eZMedia, eZISBNRegistrantRange, eZISBNGroupRange, eZISBNGroup, eZImageFile, eZEnumValue, eZEnumObjectValue, and eZBinaryFile.

Definition at line 1166 of file ezpersistentobject.php.

Referenced by attribute(), attributes(), fill(), hasAttribute(), remove(), and setAttribute().

## ◆ escapeArray()

static eZPersistentObject::escapeArray | ( |  | $array | ) |
| static

Escapes strings in an array with the help of eZDBInterface::escapeString()

Parameters

  array | $array |

Returns
  array

Definition at line 1177 of file ezpersistentobject.php.

References eZDB\instance().

## ◆ eZPersistentObject()

eZPersistentObject::eZPersistentObject | ( |  | $row = `null` | ) |

Deprecated:
  Use eZPersistentObject::__construct() instead

Parameters

  int | array | $row |

Definition at line 64 of file ezpersistentobject.php.

References __construct().

## ◆ fetchObject()

static eZPersistentObject::fetchObject | ( |  | $def,
|  |  | $field_filters,
|  |  | $conds,
|  |  | $asObject = `true`,
|  |  | $grouping = `null`,
|  |  | $custom_fields = `null`
| ) |  |
| static

Fetches and returns an object based on the given parameters and returns is either as an object or as an array

See eZPersistentObject::fetchObjectList() for a full description of the input parameters.

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  array | $field_filters | If defined determines the fields which are extracted, if not all fields are fetched
  array | $conds | An array of conditions which determines which rows are fetched
  bool | $asObject | If true the returned item is an object otherwise a db row (array).
  array | null | $grouping | An array of elements to group by
  array | $custom_fields,|null | An array of extra fields to fetch, each field may be a SQL operation

Returns
  eZPersistentObject|array|null

Definition at line 213 of file ezpersistentobject.php.

References fetchObjectList().

Referenced by eZContentObjectAttribute\cloneContentObjectAttribute(), eZContentBrowseBookmark\fetch(), eZCollaborationItemGroupLink\fetch(), eZCollaborationItemParticipantLink\fetch(), eZCollaborationItemStatus\fetch(), eZContentClassClassGroup\fetch(), eZEnumObjectValue\fetch(), eZNodeAssignment\fetch(), eZNotificationEvent\fetch(), eZVatRule\fetch(), eZURL\fetch(), eZUser\fetch(), eZCollaborationItemMessageLink\fetch(), eZCollaborationProfile\fetch(), eZCollaborationSimpleMessage\fetch(), eZContentObjectVersion\fetch(), eZDiscountRule\fetch(), eZDiscountSubRule\fetch(), eZInformationCollection\fetch(), eZOrder\fetch(), eZOrderStatus\fetch(), eZOrderStatusHistory\fetch(), eZProductCategory\fetch(), eZProductCollectionItem\fetch(), eZURLWildcard\fetch(), eZUserDiscountRule\fetch(), eZVatType\fetch(), eZWorkflowGroup\fetch(), eZWorkflowProcess\fetch(), eZRSSExport\fetch(), eZRSSExportItem\fetch(), eZRSSImport\fetch(), eZWorkflow\fetch(), eZWorkflowEvent\fetch(), eZContentClassAttribute\fetch(), eZPDFExport\fetch(), eZCollaborationItem\fetch(), eZContentClassGroup\fetch(), eZCollaborationGroup\fetch(), eZEnumValue\fetch(), eZMedia\fetch(), eZWaitUntilDateValue\fetch(), eZContentObjectAttribute\fetch(), eZBinaryFile\fetch(), eZOperationMemento\fetch(), eZViewCounter\fetch(), eZTipafriendCounter\fetch(), eZPolicy\fetch(), eZProductCollection\fetch(), eZContentBrowseRecent\fetch(), eZRole\fetch(), eZSection\fetch(), eZBasket\fetch(), eZTrigger\fetch(), eZURLObjectLink\fetch(), eZUserSetting\fetch(), eZWorkflowGroupLink\fetch(), eZContentObjectAttribute\fetchByClassAttributeID(), eZContentObjectTrashNode\fetchByContentObjectID(), eZUser\fetchByEmail(), eZBinaryFile\fetchByFileName(), eZMedia\fetchByFileName(), eZImageFile\fetchByFilepath(), eZNodeAssignment\fetchByID(), eZContentObjectAttribute\fetchByIdentifier(), eZPolicyLimitation\fetchByIdentifier(), eZSection\fetchByIdentifier(), eZForgotPassword\fetchByKey(), eZUserAccountKey\fetchByKey(), eZRSSExport\fetchByName(), eZUser\fetchByName(), eZContentClassGroup\fetchByName(), eZProductCategory\fetchByName(), eZRole\fetchByName(), eZInformationCollectionAttribute\fetchByObjectAttributeID(), eZURLWildcard\fetchBySourceURL(), eZOrderStatus\fetchByStatus(), eZCollaborationProfile\fetchByUser(), eZUserAccountKey\fetchByUserID(), eZGeneralDigestUserSettings\fetchByUserId(), eZInformationCollection\fetchByUserIdentifier(), eZOperationMemento\fetchChild(), eZNotificationCollection\fetchForHandler(), eZOperationMemento\fetchMain(), eZPolicy\fetchTemporaryCopy(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZContentObjectAttribute\language(), eZNodeAssignment\remove(), eZPolicy\role(), eZTrigger\runTrigger(), and eZContentObjectTreeNode\unserialize().

## ◆ fetchObjectList()

static eZPersistentObject::fetchObjectList | ( |  | $def,
|  |  | $field_filters = `null`,
|  |  | $conds = `null`,
|  |  | $sorts = `null`,
|  |  | $limit = `null`,
|  |  | $asObject = `true`,
|  |  | $grouping = `false`,
|  |  | $custom_fields = `null`,
|  |  | $custom_tables = `null`,
|  |  | $custom_conds = `null`
| ) |  |
| static

Creates an SQL query out of the different parameters and returns an array with the result.

A full example: `$filter = array( 'id', 'name' ); $conds = array( 'type' => 5, 'size' => array( false, array( 200, 500 ) ) ); $sorts = array( 'name' => 'asc' ); $limit = array( 'offset' => 50, 'length' => 10 ); eZPersistentObject::fetchObjectList( $def, $filter, $conds, $sorts, $limit, true, false, null )`

Counting number of elements. `$custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); // Here $field_filters is set to an empty array, that way only count is used in fields $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, false, $custom ); return $rows[0]['count'];`

Counting elements per type using grouping `$custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); $group = array( 'type' ); $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, $group, $custom ); return $rows[0]['count'];`

Example to fetch a result with custom conditions. The following example will fetch the attributes to the contentobject with id 1 and add the contentobject.name in each attribute row with the array key contentobject_name. `$objectDef = eZContentObject::definition(); $objectAttributeDef = eZContentObjectAttribute::definition();`

`$fields = array(); $conds = array( $objectDef['name'] . '.id' => 1 ); $sorts = array( $objectAttributeDef['name'] . '.sort_key_string' => 'asc' );`

`$limit = null; $asObject = false; $group = false;`

`$customFields = array( $objectAttributeDef['name'] . '.*', array( 'operation' => $objectDef['name'] . '.name', 'name' => 'contentobject_name' ) );`

`$customTables = array( $objectDef['name'] );`

`$languageCode = 'eng-GB'; $customConds = ' AND ' . $objectDef['name'] . '.current_version=' . $objectAttributeDef['name'] . '.version' . ' AND ' . $objectDef['name'] . '.id=' . $objectAttributeDef['name'] . '.contentobject_id' . ' AND ' . $objectAttributeDef['name'] . '.language_code=\'' . $languageCode . '\'';`

`$rows = eZPersistentObject::fetchObjectList( $objectAttributeDef, $fields, $conds, $sorts, $limit, $asObject, $group, $customFields, $customTables, $customConds );`

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  array | null | $field_filters | If defined determines the fields which are extracted (array of field names), if not all fields are fetched
  array | null | $conds | null for no special condition or an associative array of fields to filter on. Syntax is FIELD => CONDITION CONDITION can be one of: Scalar value: Creates a condition where FIELD must match the value, e.g `array( 'id' => 5 )` generates `SQL id = 5` Array with two scalar values: The first value is the match operator, the second is the scalar value `array( 'priority' => array( '>', 5 ) )` generates SQL `priority > 5` Array with range: The first value is `false`, the second value is an array with start and stop of range in array `array( 'type' => array( false, array( 1, 5 ) ) )` generates SQL `type BETWEEN 1 AND 5` Array with multiple elements: The first value is the field identifier, the second is an array with scalar values `array( 'id' => array( array( 1, 5, 7 ) ) )` generates SQL `id IN ( 1, 5, 7 )`
  array | null | bool | $sorts | An associative array of sorting conditions, if set to false ignores settings in $def, if set to null uses settingss in $def. Syntax is FIELD => DIRECTION. DIRECTION must either be 'asc' for ascending or 'desc' for descending.
  array | null | $limit | An associative array with limitiations, can contain 'offset': Numerical value defining the start offset for the fetch 'length': Numerical value defining the max number of items to return
  bool | $asObject | If true then it will return an array with objects, objects are created from class defined in $def. If falseit will just return the rows fetch from database.
  array | null | bool | $grouping | An array of fields to group by or null to use grouping in defintion $def.
  null | $custom_fields | Array of FIELD elements to add to SQL, can be used to perform custom fetches, e.g counts. FIELD is an associative array containing: 'operation': A text field which is included in the field list 'name': If present it adds `AS name` to the operation.
  array | null | $custom_tables | Array of additional tables
  string | null | $custom_conds | String with sql conditions for 'WHERE' clause.

Returns
  eZPersistentObject[]|array|null An array of objects or rows, null on error

Definition at line 806 of file ezpersistentobject.php.

References conditionText(), count(), handleRows(), eZDB\instance(), and replaceFieldsWithShortNames().

Referenced by eZOrder\active(), eZOrder\activeByUserID(), eZContentObject\allContentObjectAttributes(), eZMultiplexerType\attribute(), eZSection\canBeRemoved(), eZContentClassClassGroup\classInGroup(), eZURLObjectLink\clearCacheForObjectLink(), eZContentObjectTreeNodeOperations\copySubtree(), count(), eZPDFExport\countGeneratingOnceExports(), eZContentBrowseRecent\createNew(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZContentClass\exists(), eZISBNGroupRange\extractGroup(), eZISBNRegistrantRange\extractRegistrant(), eZContentClass\fetch(), eZMedia\fetch(), eZBinaryFile\fetch(), eZRSSImport\fetchActiveList(), eZUserSetting\fetchAll(), eZEnumValue\fetchAllElements(), eZEnumObjectValue\fetchAllElements(), eZWaitUntilDateValue\fetchAllElements(), eZContentObjectAttribute\fetchAttributeTranslations(), eZContentObjectTreeNode\fetchByContentObjectID(), eZMedia\fetchByContentObjectID(), eZNotificationCollectionItem\fetchByDate(), eZBinaryFile\fetchByFileName(), eZMedia\fetchByFileName(), eZISBNGroup\fetchByGroup(), eZContentClass\fetchByIdentifier(), eZSection\fetchByOffset(), eZRole\fetchByOffset(), eZPolicyLimitation\fetchByPolicyID(), eZContentClass\fetchByRemoteID(), eZDiscountSubRule\fetchByRuleID(), eZUserDiscountRule\fetchByRuleID(), eZDiscountSubRuleValue\fetchBySubRuleID(), eZUserDiscountRule\fetchByUserID(), eZVatRule\fetchByVatType(), eZContentClassClassGroup\fetchClassListByGroups(), eZInformationCollection\fetchCollectionsCount(), eZInformationCollection\fetchCollectionsList(), eZVatRule\fetchCountByVatType(), eZNotificationCollectionItem\fetchCountForEvent(), eZWorkflow\fetchEventCount(), eZWorkflow\fetchEventCountByWorkflowID(), eZWorkflow\fetchEventIndexed(), eZContentObjectVersion\fetchFiltered(), eZContentClassAttribute\fetchFilteredList(), eZWorkflowEvent\fetchFilteredList(), eZRSSExportItem\fetchFilteredList(), eZContentObject\fetchFilteredList(), eZSection\fetchFilteredList(), eZWorkflowProcess\fetchForContent(), eZImageFile\fetchForContentObjectAttribute(), eZNodeAssignment\fetchForObject(), eZWorkflowProcess\fetchForSession(), eZWorkflowProcess\fetchForStatus(), eZContentObjectVersion\fetchForUser(), eZContentClassClassGroup\fetchGroupList(), eZWorkflowGroupLink\fetchGroupList(), eZImageFile\fetchImageAttributesByFilepath(), eZCollaborationItemMessageLink\fetchItemCount(), eZCollaborationItemMessageLink\fetchItemList(), eZCollaborationNotificationRule\fetchItemTypeList(), eZContentObjectVersion\fetchLatestUserDraft(), eZURLObjectLink\fetchLinkObjectList(), eZISBNGroup\fetchList(), eZISBNGroupRange\fetchList(), eZDiscountRule\fetchList(), eZDiscountSubRule\fetchList(), eZDiscountSubRuleValue\fetchList(), eZOrder\fetchList(), eZPDFExport\fetchList(), eZProductCategory\fetchList(), eZRSSExport\fetchList(), eZSection\fetchList(), eZWorkflowEvent\fetchList(), eZWorkflowGroup\fetchList(), eZContentObject\fetchList(), eZContentClassAttribute\fetchList(), eZOrderStatus\fetchList(), eZVatType\fetchList(), eZRSSImport\fetchList(), eZContentClassName\fetchList(), eZCollaborationItemGroupLink\fetchList(), eZProductCollectionItem\fetchList(), eZWorkflowProcess\fetchList(), eZContentLanguage\fetchList(), eZNotificationEvent\fetchList(), eZPolicyLimitationValue\fetchList(), eZOperationMemento\fetchList(), eZURLWildcard\fetchList(), eZOrderItem\fetchList(), eZTrigger\fetchList(), eZProductCollectionItemOption\fetchList(), eZRole\fetchList(), eZContentClassGroup\fetchList(), eZSubtreeNotificationRule\fetchList(), eZCollaborationNotificationRule\fetchList(), eZWorkflow\fetchList(), eZContentClass\fetchList(), eZVatRule\fetchList(), eZContentClassAttribute\fetchListByClassID(), eZContentObjectAttribute\fetchListByClassID(), eZImageFile\fetchListByFilePath(), eZISBNRegistrantRange\fetchListByGroupID(), eZNodeAssignment\fetchListByID(), eZWorkflowProcess\fetchListByKey(), eZOrderItem\fetchListByType(), eZContentObject\fetchListCount(), eZSubtreeNotificationRule\fetchListCount(), eZWorkflow\fetchListCount(), eZURLWildcard\fetchListCount(), eZNotificationCollection\fetchListForHandler(), eZContentBrowseRecent\fetchListForUser(), eZContentBrowseBookmark\fetchListForUser(), eZOrderStatus\fetchMap(), eZSubtreeNotificationRule\fetchNodesForUserID(), fetchObject(), eZURLObjectLink\fetchObjectVersionCount(), eZURLObjectLink\fetchObjectVersionList(), eZOrderStatus\fetchOrderedList(), eZCollaborationItemParticipantLink\fetchParticipantList(), eZContentObjectAttribute\fetchSameClassAttributeIDList(), eZContentObject\fetchSameClassListCount(), eZViewCounter\fetchTopList(), eZUser\fetchUnactivated(), eZNotificationEvent\fetchUnhandledList(), eZContentObjectVersion\fetchUserDraft(), eZUserDiscountRule\fetchUserID(), eZWorkflowProcess\fetchUserList(), eZGeneralDigestHandler\fetchUsersForDigest(), eZContentObjectVersion\fetchVersion(), eZWorkflowGroupLink\fetchWorkflowList(), eZURL\handleList(), eZWishList\itemCount(), eZNotificationCollection\itemCount(), eZProductCollection\itemList(), eZWishList\items(), eZBasket\items(), eZNotificationCollection\items(), eZNotificationCollection\itemsToSend(), eZPolicy\limitationList(), eZRole\policyList(), eZOrder\productItems(), eZObjectRelationListType\removeRelationObject(), reorderObject(), eZImageType\restoreTrashedObjectAttribute(), storeObject(), eZImageType\trashStoredObjectAttribute(), eZISBN10To13Converter\updateContentFromClassAttribute(), eZPolicyLimitation\valueList(), eZProductCollection\verify(), and eZContentObject\versions().

## ◆ fill()

eZPersistentObject::fill | ( |  | $row | ) |

Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row. Each field will be fetch from the definition and then use that fieldname to fetch from the row and set the data.

Todo:
  Change the actual access to protected instead of just marking it as such @access protected

Parameters

  array | $row |

Returns
  bool

Definition at line 80 of file ezpersistentobject.php.

References definition().

Referenced by __construct().

## ◆ getShortAttributeName()

static eZPersistentObject::getShortAttributeName | ( |  | $db,
|  |  | $def,
|  |  | $attrName
| ) |  |
| static

Returns the short attribute name (alias) if it's defined, given attribute name otherwise

Parameters

  eZDBInterface | $db |
  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  string | $attrName |

Returns
  string

Definition at line 1438 of file ezpersistentobject.php.

Referenced by eZURL\handleList().

## ◆ handleRows()

static eZPersistentObject::handleRows | ( |  | $rows,
|  |  | $class_name,
|  |  | $asObject
| ) |  |
| static

Creates PHP objects out of the database rows $rows.

Each object is created from class $ class_name and is passed as a row array as parameter.

Parameters

  array | $rows |
  string | $class_name |
  bool | $asObject | If true then objects will be created, if not it just returns $rows as it is.

Returns
  eZPersistentObject[]|array

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 963 of file ezpersistentobject.php.

References eZDB\instance(), and replaceFieldsWithLongNames().

Referenced by eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZContentClass\fetchAllClasses(), eZURLAliasML\fetchByAction(), eZURLAliasML\fetchByParentID(), eZURLAliasML\fetchByPath(), eZContentClassClassGroup\fetchClassList(), eZOrderStatusHistory\fetchListByOrder(), eZCollaborationItem\fetchListTool(), fetchObjectList(), eZUser\fetchUserClassList(), eZURLAliasQuery\makeList(), and eZCollaborationGroup\subTree().

## ◆ hasAttribute()

eZPersistentObject::hasAttribute | ( |  | $attr | ) |

Checks if $attr is part of the definition fields or function attributes.

Parameters

  string | $attr |

Returns
  bool

Reimplemented in eZWorkflowEvent.

Definition at line 1309 of file ezpersistentobject.php.

References definition().

Referenced by eZWorkflowProcess\run().

## ◆ hasDirtyData()

eZPersistentObject::hasDirtyData | ( |  | ) |

Returns true if the data is considered dirty and needs to be stored.

Returns
  bool

Definition at line 1414 of file ezpersistentobject.php.

References $PersistentDataDirty.

Referenced by eZContentClass\sync(), and sync().

## ◆ newObjectOrder()

static eZPersistentObject::newObjectOrder | ( |  | $def,
|  |  | $orderField,
|  |  | $conditions
| ) |  |
| static

Returns an order value which can be used for new items in table, for instance placement.

Uses $def, $orderField and $conditions to figure out the currently maximum order value and returns one that is larger.

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  string | $orderField |
  array | $conditions |

Returns
  int

Definition at line 1034 of file ezpersistentobject.php.

References conditionText(), count(), and eZDB\instance().

Referenced by eZContentClassAttribute\create(), eZEnumValue\create(), and eZWorkflowEvent\create().

## ◆ remove()

eZPersistentObject::remove | ( |  | $conditions = `null`,
|  |  | $extraConditions = `null`
| ) |  |

Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames.

It uses removeObject to do the real job and passes the object defintion, conditions and extra conditions $extraConditions to this function.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | null | $conditions |
  array | null | $extraConditions |

Returns
  void

Reimplemented in eZContentClass, eZNodeAssignment, eZDiscountSubRule, and eZPDFExport.

Definition at line 239 of file ezpersistentobject.php.

References attribute(), definition(), and removeObject().

## ◆ removeObject()

static eZPersistentObject::removeObject | ( |  | $def,
|  |  | $conditions = `null`,
|  |  | $extraConditions = `null`
| ) |  |
| static

Deletes the object from the table defined in $def with conditions $conditions and extra conditions $extraConditions. The extra conditions will either be appended to the existing conditions or overwrite existing fields.

Uses conditionText() to create the condition SQL.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  array | null | $conditions |
  array | null | $extraConditions |

Returns
  void

Definition at line 271 of file ezpersistentobject.php.

References conditionText(), eZDB\instance(), and replaceFieldsWithShortNames().

Referenced by eZXMLTextType\deleteStoredObjectAttribute(), eZSubTreeHandler\fetchHttpInput(), eZGeneralDigestHandler\handle(), eZContentObject\purge(), remove(), eZDiscountSubRule\remove(), eZImageAliasHandler\removeAliasFile(), eZURLWildcard\removeAll(), eZEnumValue\removeAllElements(), eZEnumObjectValue\removeAllElements(), eZWaitUntilDateValue\removeAllElements(), eZContentClass\removeAttributes(), eZISBNGroup\removeByID(), eZISBNGroupRange\removeByID(), eZISBNRegistrantRange\removeByID(), eZDiscountRule\removeByID(), eZProductCategory\removeByID(), eZUserDiscountRule\removeByID(), eZBinaryFile\removeByID(), eZEnumValue\removeByID(), eZMedia\removeByID(), eZWaitUntilDateValue\removeByID(), eZURL\removeByID(), eZWorkflowGroupLink\removeByID(), eZCollaborationNotificationRule\removeByIdentifier(), eZURLWildcard\removeByIDs(), eZSubtreeNotificationRule\removeByNodeAndUserID(), eZEnumObjectValue\removeByOAID(), eZDiscountSubRuleValue\removeBySubRuleID(), eZForgotPassword\removeByUserID(), eZUserAccountKey\removeByUserID(), eZUserSetting\removeByUserID(), eZWishList\removeByUserID(), eZCollaborationNotificationRule\removeByUserID(), eZSubtreeNotificationRule\removeByUserID(), eZPolicyLimitationValue\removeByValue(), eZContentClassClassGroup\removeClassMembers(), eZViewCounter\removeCounter(), eZNotificationCollection\removeEmpty(), eZWorkflow\removeEvents(), eZImageFile\removeForContentObjectAttribute(), eZTipafriendCounter\removeForNode(), eZContentClassClassGroup\removeGroup(), eZContentClassClassGroup\removeGroupMembers(), eZWorkflowGroupLink\removeGroupMembers(), eZContentClassGroup\removeSelected(), eZPolicyLimitation\removeSelected(), eZWorkflowGroup\removeSelected(), eZContentClass\removeTemporary(), eZWorkflow\removeTemporary(), eZContentObjectAttribute\removeThis(), eZWorkflow\removeThis(), eZOrderStatus\removeThis(), eZVatType\removeThis(), eZWorkflowProcess\removeThis(), eZURLObjectLink\removeURLlinkList(), eZUser\removeUser(), eZUserDiscountRule\removeUser(), eZVatRule\removeVatRule(), eZWorkflow\removeWorkflow(), and eZWorkflowGroupLink\removeWorkflowMembers().

## ◆ reorderObject()

static eZPersistentObject::reorderObject | ( |  | $def,
|  |  | $orderField,
|  |  | $conditions,
|  |  | $down = `true`
| ) |  |
| static

Moves a row in a database table.

Uses $orderField to determine the order of objects in a table, usually this is a placement of some kind. It uses this order field to figure out how move the row, the row is either swapped with another row which is either above or below according to whether $down is true or false, or it is swapped with the first item or the last item depending on whether this row is first or last. Uses $conditions to figure out unique rows.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | $def | A definition array of all fields, table name and sorting (see eZPersistentObject::definition() for more info)
  array | $orderField | Associative array with one element, the key is the order id and values is order value.
  array | $conditions |
  bool | $down |

Returns
  void

Definition at line 1069 of file ezpersistentobject.php.

References conditionTextByRow(), count(), fetchObjectList(), eZDB\instance(), and swapRow().

Referenced by eZContentClassAttribute\move(), and eZWorkflowEvent\move().

## ◆ replaceFieldsWithLongNames()

static eZPersistentObject::replaceFieldsWithLongNames | ( | eZDBInterface | $db,
|  | array | $fieldDefs,
|  | & | $fields
| ) |  |
| static protected

For the given array $fields treats its keystable fields names and replaces them with long names if there is an alias in $fieldDefs.

@access protected

Parameters

  eZDBInterface | $db |
  array | $fieldDefs |
  array | $fields |

Returns
  void

Definition at line 154 of file ezpersistentobject.php.

References eZDBInterface\useShortNames().

Referenced by handleRows().

## ◆ replaceFieldsWithShortNames()

static eZPersistentObject::replaceFieldsWithShortNames | ( | eZDBInterface | $db,
|  | array | $fieldDefs,
|  | & | $fields
| ) |  |
| static

For the given array $fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in $fieldDefs.

Todo:
  Change the actual access to protected instead of just marking it as such @access protected

Parameters

  eZDBInterface | $db |
  array | $fieldDefs |
  array | $fields |

Returns
  void

Definition at line 110 of file ezpersistentobject.php.

References eZDBInterface\useShortNames().

Referenced by fetchObjectList(), removeObject(), and storeObject().

## ◆ setAttribute()

eZPersistentObject::setAttribute | ( |  | $attr,
|  |  | $val
| ) |  |

Sets the attribute $attr to the value $val.

The attribute must be present in the objects definition fields or set functions.

Parameters

  string | $attr |
  mixed | $val |

Returns
  void

Reimplemented in eZURLAliasML, eZVatRule, eZPolicyLimitation, eZPolicy, eZDiscountSubRule, and eZUserSetting.

Definition at line 1374 of file ezpersistentobject.php.

References definition(), setHasDirtyData(), and eZDebug\writeError().

Referenced by eZContentObject\__clone(), eZProductCollection\__clone(), eZProductCollectionItem\__clone(), eZProductCollectionItemOption\__clone(), eZContentClassAttribute\__construct(), eZOrder\activate(), eZBasket\createOrder(), eZOrder\detachProductCollection(), eZViewCounter\increase(), eZContentClass\initializeCopy(), eZContentClass\remoteID(), eZContentObject\remoteID(), eZContentObjectTreeNode\remoteID(), eZContentObject\removeThis(), eZContentClass\removeTranslation(), eZContentObject\removeTranslation(), eZRole\revertFromTemporaryVersion(), eZWorkflowProcess\run(), eZContentObject\serialize(), eZContentClass\setAlwaysAvailableLanguageID(), eZContentObject\setAlwaysAvailableLanguageID(), eZRSSImport\setImportDescription(), eZUser\setInformation(), eZCollaborationItemParticipantLink\setLastRead(), eZContentClass\setName(), eZWorkflowProcess\setParameters(), eZContentClass\setVersion(), eZWorkflow\setVersion(), eZContentClassAttribute\store(), eZContentObjectAttribute\store(), eZRSSImport\store(), eZPDFExport\store(), eZContentClass\store(), eZRSSExport\store(), eZContentObjectAttribute\storeData(), eZContentClass\storeVersioned(), eZContentClassAttribute\storeVersioned(), eZContentObjectVersion\unpublish(), eZContentFunctions\updateAndPublishObject(), eZContentObjectVersion\updateLanguageMask(), eZContentObjectTreeNode\updatePathIdentificationString(), eZContentObjectAttribute\updateSortKey(), and eZUserType\updateUserDraft().

## ◆ setHasDirtyData()

eZPersistentObject::setHasDirtyData | ( |  | $hasDirtyData | ) |

Sets whether the object has dirty data or not.

Parameters

  bool | $hasDirtyData |

Returns
  void

Definition at line 1425 of file ezpersistentobject.php.

Referenced by setAttribute().

## ◆ store()

eZPersistentObject::store | ( |  | $fieldFilters = `null` | ) |

Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | null | $fieldFilters |

Returns
  void

Reimplemented in eZRSSExport, eZWorkflow, eZPDFExport, eZWorkflowEvent, eZVatRule, eZUserDiscountRule, eZURLWildcard, eZURLAliasML, eZRSSImport, eZPathElement, eZContentObjectVersion, eZContentObjectTreeNode, eZContentObjectAttribute, eZContentObject, eZContentClassAttribute, eZCollaborationItemStatus, and eZUser.

Definition at line 304 of file ezpersistentobject.php.

References storeObject().

Referenced by eZOrder\activate(), eZBasket\createOrder(), eZOrder\detachProductCollection(), eZOrder\modifyStatus(), eZRole\revertFromTemporaryVersion(), eZPolicy\saveTemporary(), eZURLWildcard\store(), eZOrderStatus\storeCustom(), and sync().

## ◆ storeObject()

static eZPersistentObject::storeObject | ( |  | $obj,
|  |  | $fieldFilters = `null`
| ) |  |
| static

Stores the data in $obj to database.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Todo:
  Change the actual access to protected instead of just marking it as such @access protected

Parameters

  eZPersistentObject | $obj |
  array | null | $fieldFilters | If specified only certain fields will be stored.

Returns
  void

Definition at line 338 of file ezpersistentobject.php.

References eZDBInterface\BINDING_NO, conditionText(), count(), fetchObjectList(), eZDB\instance(), and replaceFieldsWithShortNames().

Referenced by store().

## ◆ swapRow()

static eZPersistentObject::swapRow | ( |  | $table,
|  |  | $keys,
|  |  | $order_id,
|  |  | $rows,
|  |  | $id1,
|  |  | $id2
| ) |  |
| static

Sets row id $id2 to have the placement of row id $id1.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  string | $table |
  array | $keys |
  int | $order_id |
  array | $rows |
  int | $id1 |
  int | $id2 |

Returns
  string

Definition at line 1007 of file ezpersistentobject.php.

References eZDB\instance().

Referenced by reorderObject().

## ◆ sync()

eZPersistentObject::sync | ( |  | $fieldFilters = `null` | ) |

Makes sure data is stored if the data is considered dirty.

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | null | $fieldFilters |

Returns
  void

Reimplemented in eZContentClass.

Definition at line 319 of file ezpersistentobject.php.

References hasDirtyData(), and store().

Referenced by eZContentObject\remoteID(), eZContentObjectTreeNode\remoteID(), and eZContentObjectTreeNode\updatePathIdentificationString().

## ◆ updateObjectList()

static eZPersistentObject::updateObjectList | ( |  | $parameters | ) |
| static

Updates rows matching the given parameters

Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | $parameters |

Returns
  void

Definition at line 1209 of file ezpersistentobject.php.

References eZDBInterface\BINDING_NO, and eZDB\instance().

Referenced by eZWorkflow\setIsEnabled(), eZURL\setIsValid(), eZURL\setLastChecked(), eZContentClassClassGroup\update(), and eZCollaborationItemStatus\updateFields().

## Member Data Documentation

## ◆ $AlwaysAvailable

eZPersistentObject::$AlwaysAvailable

Definition at line 1481 of file ezpersistentobject.php.

## ◆ $AutoRateValue

eZPersistentObject::$AutoRateValue

Definition at line 1516 of file ezpersistentobject.php.

## ◆ $CanTranslate

eZPersistentObject::$CanTranslate

Definition at line 1482 of file ezpersistentobject.php.

## ◆ $Category

eZPersistentObject::$Category

Definition at line 1497 of file ezpersistentobject.php.

## ◆ $ClassID

eZPersistentObject::$ClassID

Definition at line 1452 of file ezpersistentobject.php.

## ◆ $Code

eZPersistentObject::$Code

Definition at line 1514 of file ezpersistentobject.php.

## ◆ $contentobject_attribute_id

eZPersistentObject::$contentobject_attribute_id

Definition at line 1525 of file ezpersistentobject.php.

## ◆ $contentobject_id

eZPersistentObject::$contentobject_id

Definition at line 1526 of file ezpersistentobject.php.

Referenced by eZContentObjectTreeNode\object().

## ◆ $ContentObjectID

eZPersistentObject::$ContentObjectID

Definition at line 1449 of file ezpersistentobject.php.

## ◆ $ContentObjectIsPublished

eZPersistentObject::$ContentObjectIsPublished

Definition at line 1464 of file ezpersistentobject.php.

## ◆ $ContentObjectStateGroupID

eZPersistentObject::$ContentObjectStateGroupID

Definition at line 1524 of file ezpersistentobject.php.

## ◆ $ContentObjectVersion

eZPersistentObject::$ContentObjectVersion

Definition at line 1463 of file ezpersistentobject.php.

## ◆ $Created

eZPersistentObject::$Created

Definition at line 1500 of file ezpersistentobject.php.

## ◆ $CurrencyCode

eZPersistentObject::$CurrencyCode

Definition at line 1501 of file ezpersistentobject.php.

## ◆ $CurrentVersion

eZPersistentObject::$CurrentVersion

Definition at line 1455 of file ezpersistentobject.php.

Referenced by eZContentObject\addContentObjectRelation(), eZContentObject\contentObjectAttributes(), eZContentObject\fetchAttributesByIdentifier(), eZContentObject\fetchInput(), and eZContentObject\removeContentObjectRelation().

## ◆ $CustomRateValue

eZPersistentObject::$CustomRateValue

Definition at line 1517 of file ezpersistentobject.php.

## ◆ $DataFloat1

eZPersistentObject::$DataFloat1

Definition at line 1487 of file ezpersistentobject.php.

## ◆ $DataFloat2

eZPersistentObject::$DataFloat2

Definition at line 1488 of file ezpersistentobject.php.

## ◆ $DataFloat3

eZPersistentObject::$DataFloat3

Definition at line 1489 of file ezpersistentobject.php.

## ◆ $DataFloat4

eZPersistentObject::$DataFloat4

Definition at line 1490 of file ezpersistentobject.php.

## ◆ $DataInt1

eZPersistentObject::$DataInt1

Definition at line 1483 of file ezpersistentobject.php.

## ◆ $DataInt2

eZPersistentObject::$DataInt2

Definition at line 1484 of file ezpersistentobject.php.

## ◆ $DataInt3

eZPersistentObject::$DataInt3

Definition at line 1485 of file ezpersistentobject.php.

## ◆ $DataInt4

eZPersistentObject::$DataInt4

Definition at line 1486 of file ezpersistentobject.php.

## ◆ $DataText1

eZPersistentObject::$DataText1

Definition at line 1491 of file ezpersistentobject.php.

## ◆ $DataText2

eZPersistentObject::$DataText2

Definition at line 1492 of file ezpersistentobject.php.

## ◆ $DataText3

eZPersistentObject::$DataText3

Definition at line 1493 of file ezpersistentobject.php.

## ◆ $DataText4

eZPersistentObject::$DataText4

Definition at line 1494 of file ezpersistentobject.php.

## ◆ $DataText5

eZPersistentObject::$DataText5

Definition at line 1495 of file ezpersistentobject.php.

## ◆ $Depth

eZPersistentObject::$Depth

Definition at line 1465 of file ezpersistentobject.php.

## ◆ $DiscountValue

eZPersistentObject::$DiscountValue

Definition at line 1507 of file ezpersistentobject.php.

## ◆ $Email

eZPersistentObject::$Email

Definition at line 1508 of file ezpersistentobject.php.

Referenced by eZOrder\orderList(), and eZOrder\productList().

## ◆ $ID

eZPersistentObject::$ID

Definition at line 1448 of file ezpersistentobject.php.

Referenced by eZRSSExport\fetchItems(), eZVatRule\removeProductCategories(), eZPolicyLimitation\removeSelected(), eZOrderStatus\removeThis(), and eZVatType\removeThis().

## ◆ $Identifier

eZPersistentObject::$Identifier

Definition at line 1477 of file ezpersistentobject.php.

## ◆ $InitialLanguageID

eZPersistentObject::$InitialLanguageID

Definition at line 1459 of file ezpersistentobject.php.

## ◆ $IsActive

eZPersistentObject::$IsActive

Definition at line 1511 of file ezpersistentobject.php.

## ◆ $IsArchived

eZPersistentObject::$IsArchived

Definition at line 1510 of file ezpersistentobject.php.

## ◆ $IsHidden

eZPersistentObject::$IsHidden

Definition at line 1472 of file ezpersistentobject.php.

## ◆ $IsInvisible

eZPersistentObject::$IsInvisible

Definition at line 1473 of file ezpersistentobject.php.

## ◆ $IsTemporary

eZPersistentObject::$IsTemporary

Definition at line 1509 of file ezpersistentobject.php.

## ◆ $IsVATIncluded

eZPersistentObject::$IsVATIncluded

Definition at line 1505 of file ezpersistentobject.php.

## ◆ $ItemCount

eZPersistentObject::$ItemCount

Definition at line 1503 of file ezpersistentobject.php.

## ◆ $LanguageID

eZPersistentObject::$LanguageID

Definition at line 1523 of file ezpersistentobject.php.

## ◆ $LanguageMask

eZPersistentObject::$LanguageMask

Definition at line 1458 of file ezpersistentobject.php.

## ◆ $Locale

eZPersistentObject::$Locale

Definition at line 1476 of file ezpersistentobject.php.

## ◆ $Main

eZPersistentObject::$Main

Definition at line 1519 of file ezpersistentobject.php.

## ◆ $MainKey

eZPersistentObject::$MainKey

Definition at line 1521 of file ezpersistentobject.php.

## ◆ $MainNodeID

eZPersistentObject::$MainNodeID

Definition at line 1462 of file ezpersistentobject.php.

Referenced by eZContentObjectTreeNode\isMain().

## ◆ $MementoKey

eZPersistentObject::$MementoKey

Definition at line 1520 of file ezpersistentobject.php.

## ◆ $Modified

eZPersistentObject::$Modified

Definition at line 1454 of file ezpersistentobject.php.

## ◆ $ModifiedSubNode

eZPersistentObject::$ModifiedSubNode

Definition at line 1469 of file ezpersistentobject.php.

## ◆ $ModifierID

eZPersistentObject::$ModifierID

Definition at line 1513 of file ezpersistentobject.php.

## ◆ $Name

eZPersistentObject::$Name

Definition at line 1475 of file ezpersistentobject.php.

Referenced by eZNodeAssignment\name().

## ◆ $NavigationPartIdentifier

eZPersistentObject::$NavigationPartIdentifier

Definition at line 1478 of file ezpersistentobject.php.

## ◆ $NodeID

eZPersistentObject::$NodeID

Definition at line 1460 of file ezpersistentobject.php.

Referenced by eZContentObjectTreeNode\url().

## ◆ $OrderID

eZPersistentObject::$OrderID

Definition at line 1512 of file ezpersistentobject.php.

## ◆ $OwnerID

eZPersistentObject::$OwnerID

Definition at line 1451 of file ezpersistentobject.php.

## ◆ $ParentNodeID

eZPersistentObject::$ParentNodeID

Definition at line 1461 of file ezpersistentobject.php.

## ◆ $PathIdentificationString

eZPersistentObject::$PathIdentificationString

Definition at line 1471 of file ezpersistentobject.php.

## ◆ $PathString

eZPersistentObject::$PathString

Definition at line 1470 of file ezpersistentobject.php.

Referenced by eZCollaborationGroup\addChild().

## ◆ $PersistentDataDirty

eZPersistentObject::$PersistentDataDirty

Definition at line 41 of file ezpersistentobject.php.

Referenced by hasDirtyData().

## ◆ $PolicyID

eZPersistentObject::$PolicyID

Definition at line 1498 of file ezpersistentobject.php.

## ◆ $Price

eZPersistentObject::$Price

Definition at line 1504 of file ezpersistentobject.php.

## ◆ $Priority

eZPersistentObject::$Priority

Definition at line 1468 of file ezpersistentobject.php.

## ◆ $ProductCollectionID

eZPersistentObject::$ProductCollectionID

Definition at line 1502 of file ezpersistentobject.php.

## ◆ $Published

eZPersistentObject::$Published

Definition at line 1453 of file ezpersistentobject.php.

## ◆ $RateFactor

eZPersistentObject::$RateFactor

Definition at line 1518 of file ezpersistentobject.php.

## ◆ $rating

eZPersistentObject::$rating

Definition at line 1527 of file ezpersistentobject.php.

## ◆ $rating_average

eZPersistentObject::$rating_average

Definition at line 1529 of file ezpersistentobject.php.

## ◆ $rating_count

eZPersistentObject::$rating_count

Definition at line 1528 of file ezpersistentobject.php.

## ◆ $RemoteID

eZPersistentObject::$RemoteID

Definition at line 1457 of file ezpersistentobject.php.

## ◆ $SectionID

eZPersistentObject::$SectionID

Definition at line 1450 of file ezpersistentobject.php.

## ◆ $SerializedDataText

eZPersistentObject::$SerializedDataText

Definition at line 1496 of file ezpersistentobject.php.

## ◆ $SerializedDescriptionList

eZPersistentObject::$SerializedDescriptionList

Definition at line 1479 of file ezpersistentobject.php.

## ◆ $SortField

eZPersistentObject::$SortField

Definition at line 1466 of file ezpersistentobject.php.

## ◆ $SortOrder

eZPersistentObject::$SortOrder

Definition at line 1467 of file ezpersistentobject.php.

## ◆ $Status

eZPersistentObject::$Status

Definition at line 1456 of file ezpersistentobject.php.

Referenced by eZRSSExport\fetchItems().

## ◆ $Symbol

eZPersistentObject::$Symbol

Definition at line 1515 of file ezpersistentobject.php.

## ◆ $URLAliasName

eZPersistentObject::$URLAliasName

Definition at line 1480 of file ezpersistentobject.php.

Referenced by eZContentClass\urlAliasName().

## ◆ $UserID

eZPersistentObject::$UserID

Definition at line 1474 of file ezpersistentobject.php.

Referenced by eZCollaborationItemStatus\updateCache().

## ◆ $Values

eZPersistentObject::$Values

Definition at line 1499 of file ezpersistentobject.php.

## ◆ $VATValue

eZPersistentObject::$VATValue

Definition at line 1506 of file ezpersistentobject.php.

## ◆ $WorkflowEventPos

eZPersistentObject::$WorkflowEventPos

Definition at line 1522 of file ezpersistentobject.php.

The documentation for this class was generated from the following file:

- ezpersistentobject.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.