public function migrateResource(core_kernel_classes_Resource $fileResource, core_kernel_classes_Property $property, core_kernel_classes_Resource $subject)
    {
        /** @var Directory|File $unserializedFileResource */
        $unserializedFileResource = $this->getResourceFileSerializer()->unserialize($fileResource);
        $migratedValue = $this->getUrlFileSerializer()->serialize($unserializedFileResource);

        if ($this->isWetRun) {
            $subject->editPropertyValues($property, $migratedValue);
            $fileResource->delete();
        }

        ++$this->migrationInformation['migrated_count'];
    }
public function migrateResource(core_kernel_classes_Resource $fileResource, core_kernel_classes_Property $property, core_kernel_classes_Resource $subject)
    {
        /** @var Directory|File $unserializedFileResource */
        $unserializedFileResource = $this->getResourceFileSerializer()->unserialize($fileResource);
        $migratedValue = $this->getUrlFileSerializer()->serialize($unserializedFileResource);

        if ($this->isWetRun) {
            $subject->editPropertyValues($property, $migratedValue);
            $fileResource->delete();
        }

        ++$this->migrationInformation['migrated_count'];
    }
public function migrateResource ( core_kernel_classes_Resource $ fileResource , core_kernel_classes_Property $ property , core_kernel_classes_Resource $ subject ) { /** @var Directory|File $unserializedFileResource */ $ unserializedFileResource = $ this -> getResourceFileSerializer ( ) -> unserialize ( $ fileResource ) ; $ migratedValue = $ this -> getUrlFileSerializer ( ) -> serialize ( $ unserializedFileResource ) ; if ( $ this -> isWetRun ) { $ subject -> editPropertyValues ( $ property , $ migratedValue ) ; $ fileResource -> delete ( ) ; } ++ $ this -> migrationInformation [ 'migrated_count' ] ; }
Migrate a single resource.

@param core_kernel_classes_Resource $fileResource
@param core_kernel_classes_Property $property
@param core_kernel_classes_Resource $subject
@return void
@throws FileSerializerException
Migrate a single resource .