PHP Class 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.
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

buildStorageArrayForArrayProperty() protected méthode

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
Résultat array The array property to store

clearState() public méthode

Clears the internal state, discarding all stored objects.
public clearState ( ) : void
Résultat void

deserializeObjectsArray() public méthode

Deserializes a given object tree and reinjects all dependencies.
public deserializeObjectsArray ( array $dataArray ) : array
$dataArray array The serialized objects array
Résultat array The deserialized objects in an array

injectObjectManager() public méthode

Injects the object manager
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface The object manager
Résultat void

injectPersistenceManager() public méthode

Inject the persistence manager
public injectPersistenceManager ( Neos\Flow\Persistence\PersistenceManagerInterface $persistenceManager ) : void
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface The persistence manager
Résultat void

injectReflectionService() public méthode

Injects the reflection service
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService The reflection service
Résultat void

reconstituteArray() protected méthode

Reconstitutes an array from a data array.
protected reconstituteArray ( array $dataArray ) : array
$dataArray array The data array to reconstitute from
Résultat array The reconstituted array

reconstituteCollection() protected méthode

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
Résultat Doctrine\Common\Collections\Collection The reconstituted Collection

reconstituteObject() protected méthode

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
Résultat object

reconstitutePersistenceObject() protected méthode

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
Résultat object The reconstituted persistence object, NULL if none was found

reconstituteSplObjectStorage() protected méthode

Reconstitutes an SplObjectStorage from a data array.
protected reconstituteSplObjectStorage ( array $dataArray ) : SplObjectStorage
$dataArray array The data array to reconstitute from
Résultat SplObjectStorage The reconstituted SplObjectStorage

serializeObjectAsPropertyArray() public méthode

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
Résultat array The property array

Property Details

$objectManager protected_oe property

The object manager
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$objectReferences protected_oe property

protected SplObjectStorage $objectReferences
Résultat SplObjectStorage

$objectsAsArray protected_oe property

Objects stored as an array of properties
protected array $objectsAsArray
Résultat array

$persistenceManager protected_oe property

The persistence manager
protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface

$reconstitutedObjects protected_oe property

protected array $reconstitutedObjects
Résultat array

$reflectionService protected_oe property

The reflection service
protected ReflectionService,Neos\Flow\Reflection $reflectionService
Résultat Neos\Flow\Reflection\ReflectionService