Пример #1
0
 /**
  * @inheritDocs
  */
 public function getData(Mapping $mapping, $data, $key)
 {
     return $mapping->getRelation($data, $key);
 }
Пример #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;
 }