/** * 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; }