Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public final function item(Model $model)
 {
     $self = $this->getSelf($model);
     $parent = $this->getParent($model);
     $data = $this->transform($model);
     $links = $this->getLinks($model);
     $embedded = $this->getEmbedded($model);
     return $this->representationFactory->create($self, $parent)->dataFromArray($data)->links($links)->embedFromArray($embedded);
 }
Esempio n. 2
0
 /**
  * @return HalApiRepresentation
  */
 protected function createResponse()
 {
     return $this->representationFactory->create($this->self, $this->parent);
 }