/**
  * {@inheritdoc}
  */
 public function process($item)
 {
     if ($this->strategy) {
         $this->strategy->setImportExportContext($this->importExportContext);
         $item = $this->strategy->process($item);
     }
     return $item;
 }
 /**
  * {@inheritdoc}
  */
 public function process($item)
 {
     if ($this->converter) {
         $item = $this->converter->convertToImportFormat($item);
     }
     $object = $this->serializer->deserialize($item, $this->context->getOption('entityName'), null);
     if ($this->strategy) {
         $object = $this->strategy->process($object);
     }
     return $object ?: null;
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 public function setEntityName($entityName)
 {
     $this->entityName = $entityName;
     if ($this->dataConverter && $this->dataConverter instanceof EntityNameAwareInterface) {
         $this->dataConverter->setEntityName($this->entityName);
     }
     if ($this->strategy && $this->strategy instanceof EntityNameAwareInterface) {
         $this->strategy->setEntityName($this->entityName);
     }
 }