/** * @param Vertex $vertex * @return array */ private function extractVertex(Vertex $vertex) { $locations = $this->extractEntities($vertex->getAttribute('locations', array())); return array('name' => $vertex->getId(), 'usedByCount' => $vertex->getEdgesIn()->count(), 'adt' => $vertex->getAttribute('adt', array()), 'location' => array_shift($locations), 'group' => $vertex->getGroup()); }