public static function getDepartamentos()
 {
     $departamentoDao = new DepartamentoDao();
     $items = $departamentoDao->getDepartamentos($_GET);
     if ($items) {
         Flight::json($items);
     } else {
         Flight::halt(404, 'Nenhum departamento encontrado.');
     }
 }
 public static function getByNome($departamento)
 {
     return DepartamentoDao::getByNome($departamento);
 }
 public static function getByNome($departamento)
 {
     $sql = "select * from Departamento where Nome = '" . $departamento . "'";
     $resultset = ConnectionUtil::executarSelect($sql);
     return DepartamentoDao::parse($resultset[0]);
 }