Exponential Basic 2.4.0.1 Exponential Basic 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

Definition at line 33 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 |

Definition at line 53 of file ezpersistentobject.php.

References $row, and 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

Definition at line 1330 of file ezpersistentobject.php.

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

Referenced by ezpContentPublishingProcess\isAlive(), eZContentObjectStateGroupLanguage\isValid(), eZContentObjectStateLanguage\isValid(), ezpContentPublishingProcess\logStatusChange(), remove(), eZContentObjectStateGroup\stateByIdentifier(), and ezpContentPublishingProcess\version().

## ◆ attributes()

eZPersistentObject::attributes | ( |  | ) |

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

See also
  eZPersistentObject::definition()

Returns
  array

Definition at line 1293 of file ezpersistentobject.php.

References $def, and definition().

## ◆ conditionText()

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

Calls conditionTextByRow with an empty row and $conditions.

Parameters

  array | $conditions |

Returns
  string

Definition at line 629 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 644 of file ezpersistentobject.php.

References $db, $i, $id, $j, $row, count(), 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

Definition at line 188 of file ezpersistentobject.php.

References $def, $field, $rows, and fetchObjectList().

Referenced by eZContentLanguage\addLanguage(), conditionTextByRow(), ezpContentPublishingProcess\currentWorkingProcessCount(), eZContentObjectState\fetchById(), eZContentObjectStateGroup\fetchById(), eZContentObjectStateGroup\fetchByIdentifier(), eZContentObjectState\fetchByIdentifier(), fetchObjectList(), newObjectOrder(), eZContentLanguage\prioritizedLanguagesByLocaleList(), eZContentObjectStateGroup\removeStatesByID(), reorderObject(), ezpNativeUserAuthFilter\run(), eZContentLanguage\sqlFilter(), eZContentObjectState\store(), storeObject(), and eZContentLanguage\topPriorityLanguageByLocaleList().

## ◆ 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 ezpContentPublishingProcess, eZContentObjectStateLanguage, eZContentObjectStateGroupLanguage, eZContentObjectStateGroup, eZContentObjectState, and eZContentLanguage.

Definition at line 1167 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 1178 of file ezpersistentobject.php.

References $db, and $tmp.

## ◆ eZPersistentObject()

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

Deprecated:
  Use eZPersistentObject::__construct() instead

Parameters

  int | array | $row |

Definition at line 65 of file ezpersistentobject.php.

References $row, and __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 214 of file ezpersistentobject.php.

References $def, $rows, and fetchObjectList().

## ◆ 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 807 of file ezpersistentobject.php.

References $db, $def, $i, $limit, $rows, conditionText(), count(), handleRows(), and replaceFieldsWithShortNames().

Referenced by count(), eZContentObjectState\defaults(), eZContentObjectStateGroupLanguage\fetchByGroup(), eZContentObjectStateLanguage\fetchByState(), eZContentLanguage\fetchList(), fetchObject(), reorderObject(), and storeObject().

## ◆ 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 81 of file ezpersistentobject.php.

References $def, $item, $row, and 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 1439 of file ezpersistentobject.php.

References $db, and $def.

## ◆ 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

Definition at line 964 of file ezpersistentobject.php.

References $db, $row, $rows, and replaceFieldsWithLongNames().

Referenced by fetchObjectList().

## ◆ hasAttribute()

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

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

Parameters

  string | $attr |

Returns
  bool

Definition at line 1310 of file ezpersistentobject.php.

References $def, and definition().

## ◆ hasDirtyData()

eZPersistentObject::hasDirtyData | ( |  | ) |

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

Returns
  bool

Definition at line 1415 of file ezpersistentobject.php.

References $PersistentDataDirty.

Referenced by 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 1035 of file ezpersistentobject.php.

References $db, $def, $rows, conditionText(), and count().

## ◆ 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

Definition at line 240 of file ezpersistentobject.php.

References $def, 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 272 of file ezpersistentobject.php.

References $db, $def, conditionText(), and replaceFieldsWithShortNames().

Referenced by remove(), eZContentObjectState\removeByID(), and eZContentObjectStateGroup\removeByID().

## ◆ 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 1070 of file ezpersistentobject.php.

References $db, $def, $rows, $tmp, conditionTextByRow(), count(), fetchObjectList(), and swapRow().

## ◆ 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 155 of file ezpersistentobject.php.

References $db.

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 111 of file ezpersistentobject.php.

References $db.

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

Definition at line 1375 of file ezpersistentobject.php.

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

Referenced by ezpContentPublishingProcess\publish(), ezpContentPublishingProcess\reset(), ezpContentPublishingProcess\setStatus(), eZContentObjectState\store(), and eZContentObjectStateGroup\store().

## ◆ setHasDirtyData()

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

Sets whether the object has dirty data or not.

Parameters

  bool | $hasDirtyData |

Returns
  void

Definition at line 1426 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 eZContentObjectStateGroup, and eZContentObjectState.

Definition at line 305 of file ezpersistentobject.php.

References storeObject().

Referenced by ezpContentPublishingProcess\publish(), ezpContentPublishingProcess\reset(), ezpContentPublishingProcess\setStatus(), 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 339 of file ezpersistentobject.php.

References $db, $def, $field, $i, $id, $rows, conditionText(), count(), fetchObjectList(), and replaceFieldsWithShortNames().

Referenced by store(), eZContentObjectState\store(), and eZContentObjectStateGroup\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 1008 of file ezpersistentobject.php.

References $db, $i, and $rows.

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

Definition at line 320 of file ezpersistentobject.php.

References hasDirtyData(), and store().

## ◆ 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 1210 of file ezpersistentobject.php.

References $db, $def, $field, $i, $j, and $query.

## Member Data Documentation

## ◆ $AlwaysAvailable

eZPersistentObject::$AlwaysAvailable

Definition at line 1482 of file ezpersistentobject.php.

## ◆ $AutoRateValue

eZPersistentObject::$AutoRateValue

Definition at line 1517 of file ezpersistentobject.php.

## ◆ $CanTranslate

eZPersistentObject::$CanTranslate

Definition at line 1483 of file ezpersistentobject.php.

## ◆ $Category

eZPersistentObject::$Category

Definition at line 1498 of file ezpersistentobject.php.

## ◆ $ClassID

eZPersistentObject::$ClassID

Definition at line 1453 of file ezpersistentobject.php.

## ◆ $Code

eZPersistentObject::$Code

Definition at line 1515 of file ezpersistentobject.php.

## ◆ $contentobject_attribute_id

eZPersistentObject::$contentobject_attribute_id

Definition at line 1526 of file ezpersistentobject.php.

## ◆ $contentobject_id

eZPersistentObject::$contentobject_id

Definition at line 1527 of file ezpersistentobject.php.

## ◆ $ContentObjectID

eZPersistentObject::$ContentObjectID

Definition at line 1450 of file ezpersistentobject.php.

## ◆ $ContentObjectIsPublished

eZPersistentObject::$ContentObjectIsPublished

Definition at line 1465 of file ezpersistentobject.php.

## ◆ $ContentObjectStateGroupID

eZPersistentObject::$ContentObjectStateGroupID

Definition at line 1525 of file ezpersistentobject.php.

## ◆ $ContentObjectVersion

eZPersistentObject::$ContentObjectVersion

Definition at line 1464 of file ezpersistentobject.php.

## ◆ $Created

eZPersistentObject::$Created

Definition at line 1501 of file ezpersistentobject.php.

## ◆ $CurrencyCode

eZPersistentObject::$CurrencyCode

Definition at line 1502 of file ezpersistentobject.php.

## ◆ $CurrentVersion

eZPersistentObject::$CurrentVersion

Definition at line 1456 of file ezpersistentobject.php.

## ◆ $CustomRateValue

eZPersistentObject::$CustomRateValue

Definition at line 1518 of file ezpersistentobject.php.

## ◆ $DataFloat1

eZPersistentObject::$DataFloat1

Definition at line 1488 of file ezpersistentobject.php.

## ◆ $DataFloat2

eZPersistentObject::$DataFloat2

Definition at line 1489 of file ezpersistentobject.php.

## ◆ $DataFloat3

eZPersistentObject::$DataFloat3

Definition at line 1490 of file ezpersistentobject.php.

## ◆ $DataFloat4

eZPersistentObject::$DataFloat4

Definition at line 1491 of file ezpersistentobject.php.

## ◆ $DataInt1

eZPersistentObject::$DataInt1

Definition at line 1484 of file ezpersistentobject.php.

## ◆ $DataInt2

eZPersistentObject::$DataInt2

Definition at line 1485 of file ezpersistentobject.php.

## ◆ $DataInt3

eZPersistentObject::$DataInt3

Definition at line 1486 of file ezpersistentobject.php.

## ◆ $DataInt4

eZPersistentObject::$DataInt4

Definition at line 1487 of file ezpersistentobject.php.

## ◆ $DataText1

eZPersistentObject::$DataText1

Definition at line 1492 of file ezpersistentobject.php.

## ◆ $DataText2

eZPersistentObject::$DataText2

Definition at line 1493 of file ezpersistentobject.php.

## ◆ $DataText3

eZPersistentObject::$DataText3

Definition at line 1494 of file ezpersistentobject.php.

## ◆ $DataText4

eZPersistentObject::$DataText4

Definition at line 1495 of file ezpersistentobject.php.

## ◆ $DataText5

eZPersistentObject::$DataText5

Definition at line 1496 of file ezpersistentobject.php.

## ◆ $Depth

eZPersistentObject::$Depth

Definition at line 1466 of file ezpersistentobject.php.

## ◆ $DiscountValue

eZPersistentObject::$DiscountValue

Definition at line 1508 of file ezpersistentobject.php.

## ◆ $Email

eZPersistentObject::$Email

Definition at line 1509 of file ezpersistentobject.php.

## ◆ $ID

eZPersistentObject::$ID

Definition at line 1449 of file ezpersistentobject.php.

Referenced by eZContentObjectState\allTranslations(), eZContentObjectStateGroup\allTranslations(), eZContentObjectState\objectCount(), and eZContentObjectState\store().

## ◆ $Identifier

eZPersistentObject::$Identifier

Definition at line 1478 of file ezpersistentobject.php.

## ◆ $InitialLanguageID

eZPersistentObject::$InitialLanguageID

Definition at line 1460 of file ezpersistentobject.php.

## ◆ $IsActive

eZPersistentObject::$IsActive

Definition at line 1512 of file ezpersistentobject.php.

## ◆ $IsArchived

eZPersistentObject::$IsArchived

Definition at line 1511 of file ezpersistentobject.php.

## ◆ $IsHidden

eZPersistentObject::$IsHidden

Definition at line 1473 of file ezpersistentobject.php.

## ◆ $IsInvisible

eZPersistentObject::$IsInvisible

Definition at line 1474 of file ezpersistentobject.php.

## ◆ $IsTemporary

eZPersistentObject::$IsTemporary

Definition at line 1510 of file ezpersistentobject.php.

## ◆ $IsVATIncluded

eZPersistentObject::$IsVATIncluded

Definition at line 1506 of file ezpersistentobject.php.

## ◆ $ItemCount

eZPersistentObject::$ItemCount

Definition at line 1504 of file ezpersistentobject.php.

## ◆ $LanguageID

eZPersistentObject::$LanguageID

Definition at line 1524 of file ezpersistentobject.php.

## ◆ $LanguageMask

eZPersistentObject::$LanguageMask

Definition at line 1459 of file ezpersistentobject.php.

## ◆ $Locale

eZPersistentObject::$Locale

Definition at line 1477 of file ezpersistentobject.php.

## ◆ $Main

eZPersistentObject::$Main

Definition at line 1520 of file ezpersistentobject.php.

## ◆ $MainKey

eZPersistentObject::$MainKey

Definition at line 1522 of file ezpersistentobject.php.

## ◆ $MainNodeID

eZPersistentObject::$MainNodeID

Definition at line 1463 of file ezpersistentobject.php.

## ◆ $MementoKey

eZPersistentObject::$MementoKey

Definition at line 1521 of file ezpersistentobject.php.

## ◆ $Modified

eZPersistentObject::$Modified

Definition at line 1455 of file ezpersistentobject.php.

## ◆ $ModifiedSubNode

eZPersistentObject::$ModifiedSubNode

Definition at line 1470 of file ezpersistentobject.php.

## ◆ $ModifierID

eZPersistentObject::$ModifierID

Definition at line 1514 of file ezpersistentobject.php.

## ◆ $Name

eZPersistentObject::$Name

Definition at line 1476 of file ezpersistentobject.php.

## ◆ $NavigationPartIdentifier

eZPersistentObject::$NavigationPartIdentifier

Definition at line 1479 of file ezpersistentobject.php.

## ◆ $NodeID

eZPersistentObject::$NodeID

Definition at line 1461 of file ezpersistentobject.php.

## ◆ $OrderID

eZPersistentObject::$OrderID

Definition at line 1513 of file ezpersistentobject.php.

## ◆ $OwnerID

eZPersistentObject::$OwnerID

Definition at line 1452 of file ezpersistentobject.php.

## ◆ $ParentNodeID

eZPersistentObject::$ParentNodeID

Definition at line 1462 of file ezpersistentobject.php.

## ◆ $PathIdentificationString

eZPersistentObject::$PathIdentificationString

Definition at line 1472 of file ezpersistentobject.php.

## ◆ $PathString

eZPersistentObject::$PathString

Definition at line 1471 of file ezpersistentobject.php.

## ◆ $PersistentDataDirty

eZPersistentObject::$PersistentDataDirty

Definition at line 42 of file ezpersistentobject.php.

Referenced by hasDirtyData().

## ◆ $PolicyID

eZPersistentObject::$PolicyID

Definition at line 1499 of file ezpersistentobject.php.

## ◆ $Price

eZPersistentObject::$Price

Definition at line 1505 of file ezpersistentobject.php.

## ◆ $Priority

eZPersistentObject::$Priority

Definition at line 1469 of file ezpersistentobject.php.

## ◆ $ProductCollectionID

eZPersistentObject::$ProductCollectionID

Definition at line 1503 of file ezpersistentobject.php.

## ◆ $Published

eZPersistentObject::$Published

Definition at line 1454 of file ezpersistentobject.php.

## ◆ $RateFactor

eZPersistentObject::$RateFactor

Definition at line 1519 of file ezpersistentobject.php.

## ◆ $rating

eZPersistentObject::$rating

Definition at line 1528 of file ezpersistentobject.php.

## ◆ $rating_average

eZPersistentObject::$rating_average

Definition at line 1530 of file ezpersistentobject.php.

## ◆ $rating_count

eZPersistentObject::$rating_count

Definition at line 1529 of file ezpersistentobject.php.

## ◆ $RemoteID

eZPersistentObject::$RemoteID

Definition at line 1458 of file ezpersistentobject.php.

## ◆ $SectionID

eZPersistentObject::$SectionID

Definition at line 1451 of file ezpersistentobject.php.

## ◆ $SerializedDataText

eZPersistentObject::$SerializedDataText

Definition at line 1497 of file ezpersistentobject.php.

## ◆ $SerializedDescriptionList

eZPersistentObject::$SerializedDescriptionList

Definition at line 1480 of file ezpersistentobject.php.

## ◆ $SortField

eZPersistentObject::$SortField

Definition at line 1467 of file ezpersistentobject.php.

## ◆ $SortOrder

eZPersistentObject::$SortOrder

Definition at line 1468 of file ezpersistentobject.php.

## ◆ $Status

eZPersistentObject::$Status

Definition at line 1457 of file ezpersistentobject.php.

## ◆ $Symbol

eZPersistentObject::$Symbol

Definition at line 1516 of file ezpersistentobject.php.

## ◆ $URLAliasName

eZPersistentObject::$URLAliasName

Definition at line 1481 of file ezpersistentobject.php.

## ◆ $UserID

eZPersistentObject::$UserID

Definition at line 1475 of file ezpersistentobject.php.

## ◆ $Values

eZPersistentObject::$Values

Definition at line 1500 of file ezpersistentobject.php.

## ◆ $VATValue

eZPersistentObject::$VATValue

Definition at line 1507 of file ezpersistentobject.php.

## ◆ $WorkflowEventPos

eZPersistentObject::$WorkflowEventPos

Definition at line 1523 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+.