Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
eZ\Publish\API\Repository\Values\ValueObject Class Reference
Inheritance diagram for eZ\Publish\API\Repository\Values\ValueObject:

## Public Member Functions
| __construct (array $properties=[])
| Construct object optionally with a set of properties. More...
| __set ($property, $value)
| Magic set function handling writes to non public properties. More...
| __get ($property)
| Magic get function handling read to non public properties. More...
| __isset ($property)
| Magic isset function handling isset() to non public properties. More...
| __unset ($property)
| Magic unset function handling unset() to non public properties. More...
| attribute ($property)
| Internal function for Legacy template engine compatibility to get property value. More...
| attributes ()
| Internal function for Legacy template engine compatibility to get properties. More...
| hasAttribute ($property)
| Internal function for Legacy template engine compatibility to check existence of property. More...

## Static Public Member Functions
static | __set_state (array $array)
| Returns a new instance of this class with the data specified by $array. More...

## Protected Member Functions
| getProperties ($dynamicProperties=[])
| Function where list of properties are returned. More...

## Detailed Description

Definition at line 20 of file API/Repository/Values/ValueObject.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\API\Repository\Values\ValueObject::__construct | ( | array | $properties = `[]` | ) |

Construct object optionally with a set of properties.

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

  array | $properties |

Reimplemented in eZ\Publish\Core\FieldType\MapLocation\Value, eZ\Publish\Core\FieldType\Selection\Value, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition, eZ\Publish\Core\FieldType\Page\Parts\Zone, eZ\Publish\Core\FieldType\Page\Parts\Page, eZ\Publish\Core\FieldType\Page\Parts\Base, eZ\Publish\API\Repository\Values\Content\Trash\SearchResult, eZ\Publish\Core\FieldType\Image\Value, eZ\Publish\Core\FieldType\BinaryBase\Value, eZ\Publish\Core\FieldType\RelationList\Value, eZ\Publish\Core\REST\Client\Values\ContentType\FieldDefinition, eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeCreateStruct, eZ\Publish\Core\Repository\Values\ContentType\ContentType, eZ\Publish\Core\Repository\Values\Content\Content, eZ\Publish\Core\FieldType\Country\Value, and eZ\Publish\Core\FieldType\Author\Value.

Definition at line 30 of file API/Repository/Values/ValueObject.php.

## Member Function Documentation

## ◆ __get()

eZ\Publish\API\Repository\Values\ValueObject::__get | ( |  | $property | ) |

Magic get function handling read to non public properties.

Returns value for all readonly (protected) properties.

@ignore This method is for internal use

Exceptions

Reimplemented in eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeDraft, eZ\Publish\Core\REST\Client\Values\Content\VersionInfo, eZ\Publish\Core\FieldType\Image\Value, eZ\Publish\Core\FieldType\BinaryBase\Value, eZ\Publish\Core\REST\Client\Values\User\UserGroup, eZ\Publish\Core\REST\Client\Values\User\User, eZ\Publish\Core\REST\Client\Values\ContentType\ContentType, eZ\Publish\Core\REST\Client\Values\Content\TrashItem, eZ\Publish\Core\Repository\Values\User\UserGroup, eZ\Publish\Core\Repository\Values\User\User, eZ\Publish\Core\Repository\Values\User\RoleDraft, eZ\Publish\Core\Repository\Values\User\PolicyDraft, eZ\Publish\Core\Repository\Values\ObjectState\ObjectStateGroup, eZ\Publish\Core\Repository\Values\ObjectState\ObjectState, eZ\Publish\Core\Repository\Values\ContentType\ContentTypeDraft, eZ\Publish\Core\Repository\Values\Content\TrashItem, eZ\Publish\Core\Repository\Values\Content\Location, eZ\Publish\Core\Repository\Values\Content\Content, and eZ\Publish\Core\Repository\Values\Content\ContentProxy.

Definition at line 94 of file API/Repository/Values/ValueObject.php.

Referenced by eZ\Publish\API\Repository\Values\ValueObject\attribute().

## ◆ __isset()

eZ\Publish\API\Repository\Values\ValueObject::__isset | ( |  | $property | ) |

Magic isset function handling isset() to non public properties.

Returns true for all (public/)protected/private properties.

@ignore This method is for internal use

Parameters

  string | $property | Name of the property

Returns
  bool

Reimplemented in eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeDraft, eZ\Publish\Core\REST\Client\Values\Content\VersionInfo, eZ\Publish\Core\FieldType\BinaryBase\Value, eZ\Publish\Core\REST\Client\Values\ContentType\ContentType, eZ\Publish\Core\Repository\Values\User\UserGroup, eZ\Publish\Core\Repository\Values\User\User, eZ\Publish\Core\Repository\Values\User\RoleDraft, eZ\Publish\Core\Repository\Values\User\PolicyDraft, eZ\Publish\Core\Repository\Values\ObjectState\ObjectStateGroup, eZ\Publish\Core\Repository\Values\ObjectState\ObjectState, eZ\Publish\Core\Repository\Values\ContentType\ContentTypeDraft, eZ\Publish\Core\Repository\Values\Content\TrashItem, eZ\Publish\Core\Repository\Values\Content\Location, eZ\Publish\Core\Repository\Values\Content\Content, and eZ\Publish\Core\Repository\Values\Content\ContentProxy.

Definition at line 113 of file API/Repository/Values/ValueObject.php.

Referenced by eZ\Publish\API\Repository\Values\ValueObject\getProperties(), and eZ\Publish\API\Repository\Values\ValueObject\hasAttribute().

## ◆ __set()

eZ\Publish\API\Repository\Values\ValueObject::__set | ( |  | $property,
|  |  | $value
| ) |  |

Magic set function handling writes to non public properties.

@ignore This method is for internal use

Exceptions

Reimplemented in eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeDraft, eZ\Publish\Core\FieldType\Image\Value, eZ\Publish\Core\FieldType\BinaryBase\Value, eZ\Publish\Core\Repository\Values\User\RoleDraft, eZ\Publish\Core\Repository\Values\User\PolicyDraft, and eZ\Publish\Core\Repository\Values\ContentType\ContentTypeDraft.

Definition at line 73 of file API/Repository/Values/ValueObject.php.

Referenced by eZ\Publish\API\Repository\Values\ValueObject\__unset().

## ◆ __set_state()

static eZ\Publish\API\Repository\Values\ValueObject::__set_state | ( | array | $array | ) |
| static

Returns a new instance of this class with the data specified by $array.

$array contains all the data members of this class in the form: array('member_name'=>value).

__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.

@ignore This method is for internal use

Parameters

  mixed[] | $array |

Returns
  ValueObject

Definition at line 153 of file API/Repository/Values/ValueObject.php.

## ◆ __unset()

eZ\Publish\API\Repository\Values\ValueObject::__unset | ( |  | $property | ) |

Magic unset function handling unset() to non public properties.

@ignore This method is for internal use

Exceptions

Definition at line 132 of file API/Repository/Values/ValueObject.php.

References eZ\Publish\API\Repository\Values\ValueObject\__set().

## ◆ attribute()

eZ\Publish\API\Repository\Values\ValueObject::attribute | ( |  | $property | ) |
| final

Internal function for Legacy template engine compatibility to get property value.

@ignore This method is for internal use

Deprecated:
  Since 5.0, available purely for legacy eZTemplate compatibility

@uses __get()

Parameters

  string | $property |

Returns
  mixed

Definition at line 171 of file API/Repository/Values/ValueObject.php.

References eZ\Publish\API\Repository\Values\ValueObject\__get().

## ◆ attributes()

eZ\Publish\API\Repository\Values\ValueObject::attributes | ( |  | ) |
| final

Internal function for Legacy template engine compatibility to get properties.

@ignore This method is for internal use

Deprecated:
  Since 5.0, available purely for legacy eZTemplate compatibility

@uses __isset()

Returns
  array

Definition at line 187 of file API/Repository/Values/ValueObject.php.

References eZ\Publish\API\Repository\Values\ValueObject\getProperties().

Referenced by eZ\Publish\Core\FieldType\Page\Parts\Base\__construct(), eZ\Publish\Core\MVC\Symfony\Controller\Content\PreviewController\getForwardRequest(), and eZ\Bundle\EzPublishCoreBundle\Fragment\serializeSiteAccess().

## ◆ getProperties()

eZ\Publish\API\Repository\Values\ValueObject::getProperties | ( |  | $dynamicProperties = `[]` | ) |
| protected

Function where list of properties are returned.

Used by {

See also
  attributes()}, override to add dynamic properties

@uses __isset()

Todo:
  Make object traversable and reuse this function there (hence why this is not exposed)

Parameters

  array | $dynamicProperties | Additional dynamic properties exposed on the object

Returns
  array

Reimplemented in eZ\Publish\Core\Repository\Values\Content\Location.

Definition at line 50 of file API/Repository/Values/ValueObject.php.

References eZ\Publish\API\Repository\Values\ValueObject\__isset().

Referenced by eZ\Publish\API\Repository\Values\ValueObject\attributes(), eZ\Publish\Core\FieldType\Page\Parts\Base\getState(), and eZ\Publish\Core\FieldType\Page\Parts\Item\getState().

## ◆ hasAttribute()

eZ\Publish\API\Repository\Values\ValueObject::hasAttribute | ( |  | $property | ) |
| final

Internal function for Legacy template engine compatibility to check existence of property.

@ignore This method is for internal use

Deprecated:
  Since 5.0, available purely for legacy eZTemplate compatibility

@uses __isset()

Parameters

  string | $property |

Returns
  bool

Definition at line 205 of file API/Repository/Values/ValueObject.php.

References eZ\Publish\API\Repository\Values\ValueObject\__isset().

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

- API/Repository/Values/ValueObject.php

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