/** * @param type $current * @return Analyse */ protected function buildObject($current) { $subarea = new SubArea($current['subareaName'], $current['theme']); $state = new State($current['idState'], $current['uf'], $current['nameState']); $analysis = new Analyse($current['title'], $subarea, $state, $current['date']); $analysis->setLink($current['link']); return $analysis; }
/** * @param type $pub * @return Analyse */ private function buildAnalysis($pub) { $publication = new Analyse($pub['title'], null, null, $pub['date']); $publication->setId($pub['id']); $publication->setLink($pub['link']); return $publication; }