/** * @inheritDocs */ public function getData(Mapping $mapping, $data, $key) { return $mapping->getRelation($data, $key); }
/** * @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; }