Exemplo n.º 1
0
 /**
  * @inheritDocs
  */
 public function getData(Mapping $mapping, $data, $key)
 {
     return $mapping->getRelation($data, $key);
 }
Exemplo n.º 2
0
 /**
  * @inheritDocs
  */
 public function getData(Mapping $mapping, $data, $key)
 {
     $key = str_replace('[]', '', $key);
     list($relation, $hydrator) = $mapping->getRelationAndHydrator($data, $key);
     return $hydrator instanceof FirstInCollectionInterface && $relation ? $hydrator->getFirst($relation) : null;
 }