public function thawProperties($object, $identifier, array $objectData)
    {
        $classSchema = $this->reflectionService->getClassSchema($objectData['classname']);

        foreach ($objectData['properties'] as $propertyName => $propertyData) {
            if (!$classSchema->hasProperty($propertyName) ||
                $classSchema->isPropertyTransient($propertyName)) {
                continue;
            }
            $propertyValue = null;

            if ($propertyData['value'] !== null) {
                switch ($propertyData['type']) {
                    case 'integer':
                        $propertyValue = (int) $propertyData['value'];
                    break;
                    case 'float':
                        $propertyValue = (float) $propertyData['value'];
                    break;
                    case 'boolean':
                        $propertyValue = (boolean) $propertyData['value'];
                    break;
                    case 'string':
                        $propertyValue = (string) $propertyData['value'];
                    break;
                    case 'array':
                        $propertyValue = $this->mapArray($propertyData['value']);
                    break;
                    case 'Doctrine\Common\Collections\Collection':
                    case 'Doctrine\Common\Collections\ArrayCollection':
                        $propertyValue = new ArrayCollection($this->mapArray($propertyData['value']));
                    break;
                    case 'SplObjectStorage':
                        $propertyValue = $this->mapSplObjectStorage($propertyData['value'], $classSchema->isPropertyLazy($propertyName));
                    break;
                    case 'DateTime':
                        $propertyValue = $this->mapDateTime($propertyData['value']);
                    break;
                    default:
                        if ($propertyData['value'] === false) {
                            throw new UnknownObjectException('An expected object was not found by the backend. It was expected for ' . $objectData['classname'] . '::' . $propertyName, 1289509867);
                        }
                        $propertyValue = $this->mapToObject($propertyData['value']);
                    break;
                }
            } else {
                switch ($propertyData['type']) {
                    case 'NULL':
                        break;
                    case 'array':
                        $propertyValue = $this->mapArray(null);
                    break;
                    case Collection::class:
                    case ArrayCollection::class:
                        $propertyValue = new ArrayCollection();
                    break;
                    case 'SplObjectStorage':
                        $propertyValue = $this->mapSplObjectStorage(null);
                    break;
                }
            }

            ObjectAccess::setProperty($object, $propertyName, $propertyValue, true);
        }

        if (isset($objectData['metadata'])) {
            $object->Flow_Persistence_Metadata = $objectData['metadata'];
        }

        ObjectAccess::setProperty($object, 'Persistence_Object_Identifier', $identifier, true);
    }
public function thawProperties($object, $identifier, array $objectData)
    {
        $classSchema = $this->reflectionService->getClassSchema($objectData['classname']);

        foreach ($objectData['properties'] as $propertyName => $propertyData) {
            if (!$classSchema->hasProperty($propertyName) ||
                $classSchema->isPropertyTransient($propertyName)) {
                continue;
            }
            $propertyValue = null;

            if ($propertyData['value'] !== null) {
                switch ($propertyData['type']) {
                    case 'integer':
                        $propertyValue = (int) $propertyData['value'];
                    break;
                    case 'float':
                        $propertyValue = (float) $propertyData['value'];
                    break;
                    case 'boolean':
                        $propertyValue = (boolean) $propertyData['value'];
                    break;
                    case 'string':
                        $propertyValue = (string) $propertyData['value'];
                    break;
                    case 'array':
                        $propertyValue = $this->mapArray($propertyData['value']);
                    break;
                    case 'Doctrine\Common\Collections\Collection':
                    case 'Doctrine\Common\Collections\ArrayCollection':
                        $propertyValue = new ArrayCollection($this->mapArray($propertyData['value']));
                    break;
                    case 'SplObjectStorage':
                        $propertyValue = $this->mapSplObjectStorage($propertyData['value'], $classSchema->isPropertyLazy($propertyName));
                    break;
                    case 'DateTime':
                        $propertyValue = $this->mapDateTime($propertyData['value']);
                    break;
                    default:
                        if ($propertyData['value'] === false) {
                            throw new UnknownObjectException('An expected object was not found by the backend. It was expected for ' . $objectData['classname'] . '::' . $propertyName, 1289509867);
                        }
                        $propertyValue = $this->mapToObject($propertyData['value']);
                    break;
                }
            } else {
                switch ($propertyData['type']) {
                    case 'NULL':
                        break;
                    case 'array':
                        $propertyValue = $this->mapArray(null);
                    break;
                    case Collection::class:
                    case ArrayCollection::class:
                        $propertyValue = new ArrayCollection();
                    break;
                    case 'SplObjectStorage':
                        $propertyValue = $this->mapSplObjectStorage(null);
                    break;
                }
            }

            ObjectAccess::setProperty($object, $propertyName, $propertyValue, true);
        }

        if (isset($objectData['metadata'])) {
            $object->Flow_Persistence_Metadata = $objectData['metadata'];
        }

        ObjectAccess::setProperty($object, 'Persistence_Object_Identifier', $identifier, true);
    }
public function thawProperties ( $ object , $ identifier , array $ objectData ) { $ classSchema = $ this -> reflectionService -> getClassSchema ( $ objectData [ 'classname' ] ) ; foreach ( $ objectData [ 'properties' ] as $ propertyName => $ propertyData ) { if ( ! $ classSchema -> hasProperty ( $ propertyName ) || $ classSchema -> isPropertyTransient ( $ propertyName ) ) { continue ; } $ propertyValue = null ; if ( $ propertyData [ 'value' ] !== null ) { switch ( $ propertyData [ 'type' ] ) { case 'integer' : $ propertyValue = ( int ) $ propertyData [ 'value' ] ; break ; case 'float' : $ propertyValue = ( float ) $ propertyData [ 'value' ] ; break ; case 'boolean' : $ propertyValue = ( boolean ) $ propertyData [ 'value' ] ; break ; case 'string' : $ propertyValue = ( string ) $ propertyData [ 'value' ] ; break ; case 'array' : $ propertyValue = $ this -> mapArray ( $ propertyData [ 'value' ] ) ; break ; case 'Doctrine\Common\Collections\Collection' : case 'Doctrine\Common\Collections\ArrayCollection' : $ propertyValue = new ArrayCollection ( $ this -> mapArray ( $ propertyData [ 'value' ] ) ) ; break ; case 'SplObjectStorage' : $ propertyValue = $ this -> mapSplObjectStorage ( $ propertyData [ 'value' ] , $ classSchema -> isPropertyLazy ( $ propertyName ) ) ; break ; case 'DateTime' : $ propertyValue = $ this -> mapDateTime ( $ propertyData [ 'value' ] ) ; break ; default : if ( $ propertyData [ 'value' ] === false ) { throw new UnknownObjectException ( 'An expected object was not found by the backend. It was expected for ' . $ objectData [ 'classname' ] . '::' . $ propertyName , 1289509867 ) ; } $ propertyValue = $ this -> mapToObject ( $ propertyData [ 'value' ] ) ; break ; } } else { switch ( $ propertyData [ 'type' ] ) { case 'NULL' : break ; case 'array' : $ propertyValue = $ this -> mapArray ( null ) ; break ; case Collection :: class : case ArrayCollection :: class : $ propertyValue = new ArrayCollection ( ) ; break ; case 'SplObjectStorage' : $ propertyValue = $ this -> mapSplObjectStorage ( null ) ; break ; } } ObjectAccess :: setProperty ( $ object , $ propertyName , $ propertyValue , true ) ; } if ( isset ( $ objectData [ 'metadata' ] ) ) { $ object -> Flow_Persistence_Metadata = $ objectData [ 'metadata' ] ; } ObjectAccess :: setProperty ( $ object , 'Persistence_Object_Identifier' , $ identifier , true ) ; }
Sets the given properties on the object.

@param object $object The object to set properties on
@param string $identifier The identifier of the object
@param array $objectData
@return void
@throws UnknownObjectException
Sets the given properties on the object .