PHP Класс Neos\Flow\ObjectManagement\ObjectSerializer

Dependant objects are only included if they are not singleton and the property is not annotated transient. Afterwards it can reconstitute the objects from the array.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface The object manager
$objectReferences SplObjectStorage
$objectsAsArray array Objects stored as an array of properties
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface The persistence manager
$reconstitutedObjects array
$reflectionService Neos\Flow\Reflection\ReflectionService The reflection service

Открытые методы

Метод Описание
clearState ( ) : void Clears the internal state, discarding all stored objects.
deserializeObjectsArray ( array $dataArray ) : array Deserializes a given object tree and reinjects all dependencies.
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void Injects the object manager
injectPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void Inject the persistence manager
injectReflectionService ( ReflectionService $reflectionService ) : void Injects the reflection service
serializeObjectAsPropertyArray ( object $object, boolean $isTopLevelItem = true ) : array Serializes an object as property array.

Защищенные методы

Метод Описание
buildStorageArrayForArrayProperty ( array $arrayProperty ) : array Builds a storable array out of an array property. It calls itself recursively for multidimensional arrays. For objects putObject() ist called with the object's hash value as $objectName.
reconstituteArray ( array $dataArray ) : array Reconstitutes an array from a data array.
reconstituteCollection ( string $type, array $dataArray ) : Doctrine\Common\Collections\Collection Reconstitutes a Doctrine Collection from a data array.
reconstituteObject ( string $objectHash, array $objectData ) : object Reconstitutes an object from a serialized object without calling the constructor.
reconstitutePersistenceObject ( string $className, string $uuid ) : object Reconstitutes a persistence object (entity or valueobject) identified by the given UUID.
reconstituteSplObjectStorage ( array $dataArray ) : SplObjectStorage Reconstitutes an SplObjectStorage from a data array.

Описание методов

buildStorageArrayForArrayProperty() защищенный Метод

Builds a storable array out of an array property. It calls itself recursively for multidimensional arrays. For objects putObject() ist called with the object's hash value as $objectName.
protected buildStorageArrayForArrayProperty ( array $arrayProperty ) : array
$arrayProperty array The source array property
Результат array The array property to store

clearState() публичный Метод

Clears the internal state, discarding all stored objects.
public clearState ( ) : void
Результат void

deserializeObjectsArray() публичный Метод

Deserializes a given object tree and reinjects all dependencies.
public deserializeObjectsArray ( array $dataArray ) : array
$dataArray array The serialized objects array
Результат array The deserialized objects in an array

injectObjectManager() публичный Метод

Injects the object manager
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface The object manager
Результат void

injectPersistenceManager() публичный Метод

Inject the persistence manager
public injectPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface The persistence manager
Результат void

injectReflectionService() публичный Метод

Injects the reflection service
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService The reflection service
Результат void

reconstituteArray() защищенный Метод

Reconstitutes an array from a data array.
protected reconstituteArray ( array $dataArray ) : array
$dataArray array The data array to reconstitute from
Результат array The reconstituted array

reconstituteCollection() защищенный Метод

Reconstitutes a Doctrine Collection from a data array.
protected reconstituteCollection ( string $type, array $dataArray ) : Doctrine\Common\Collections\Collection
$type string The collection type (class name) to create
$dataArray array The data array to reconstitute from
Результат Doctrine\Common\Collections\Collection The reconstituted Collection

reconstituteObject() защищенный Метод

Reconstitutes an object from a serialized object without calling the constructor.
protected reconstituteObject ( string $objectHash, array $objectData ) : object
$objectHash string Identifier of the serialized object
$objectData array The object data array
Результат object

reconstitutePersistenceObject() защищенный Метод

Reconstitutes a persistence object (entity or valueobject) identified by the given UUID.
protected reconstitutePersistenceObject ( string $className, string $uuid ) : object
$className string The class name of the object to retrieve
$uuid string The UUID of the object
Результат object The reconstituted persistence object, NULL if none was found

reconstituteSplObjectStorage() защищенный Метод

Reconstitutes an SplObjectStorage from a data array.
protected reconstituteSplObjectStorage ( array $dataArray ) : SplObjectStorage
$dataArray array The data array to reconstitute from
Результат SplObjectStorage The reconstituted SplObjectStorage

serializeObjectAsPropertyArray() публичный Метод

Serializes an object as property array.
public serializeObjectAsPropertyArray ( object $object, boolean $isTopLevelItem = true ) : array
$object object The object to store in the registry
$isTopLevelItem boolean Internal flag for managing the recursion
Результат array The property array

Описание свойств

$objectManager защищенное свойство

The object manager
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Результат Neos\Flow\ObjectManagement\ObjectManagerInterface

$objectReferences защищенное свойство

protected SplObjectStorage $objectReferences
Результат SplObjectStorage

$objectsAsArray защищенное свойство

Objects stored as an array of properties
protected array $objectsAsArray
Результат array

$persistenceManager защищенное свойство

The persistence manager
protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

$reconstitutedObjects защищенное свойство

protected array $reconstitutedObjects
Результат array

$reflectionService защищенное свойство

The reflection service
protected ReflectionService,Neos\Flow\Reflection $reflectionService
Результат Neos\Flow\Reflection\ReflectionService