Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function handleParsing(AbstractCommand $command, Response $response, $contentType)
 {
     // Only use overridden behaviour if response type is a model
     if (!$this->responseTypeIsModel($command)) {
         return parent::handleParsing($command, $response, $contentType);
     }
     // Preparation of model data (this is same as parent class)
     $structure = $command->getOperation()->getServiceDescription()->getModel($command->getOperation()->getResponseClass());
     $data = $this->visitResult($structure, $command, $response);
     return $this->createClass(static::MODEL_CLASS, array($data, $structure));
 }