public static function getByIdTop($idTop) { $rows = DaoCore::find('*', self::$global_view, ['idTop' => $idTop], '', ' = '); $topics = array(); foreach ($rows as $row) { $categorie = new CategorieModel(); $categorie->hydrate($row); $topic = new TopicModel(); $topic->hydrate($row); $topic->setCategorie($categorie); array_push($topics, $topic); } return $topics[0]; }