コード例 #1
0
ファイル: ExportProcessor.php プロジェクト: Maksold/platform
 /**
  * Processes entity to export format
  *
  * @param mixed $object
  * @return array
  * @throws RuntimeException
  */
 public function process($object)
 {
     if (!$this->serializer) {
         throw new RuntimeException('Serializer must be injected.');
     }
     $data = $this->serializer->serialize($object, null, $this->context->getConfiguration());
     if ($this->dataConverter) {
         $data = $this->dataConverter->convertToExportFormat($data);
     }
     return $data;
 }