public static function listar() { $noticia = new Noticia(); $noticias = $noticia->listar(); self::$variaveis = array('noticias' => $noticias); self::$corpo = "listar"; self::renderizar(self::$viewController); }
public static function noticia() { $texto = new Texto(); $texto->selecionarPorId(6); $noticia = new Noticia(); $noticia->selecionarPorId($_GET['id']); $outrasNoticias = $noticia->listar('id <> ' . $noticia->id, 'RAND()', 3); self::$corpo = "noticia"; self::$variaveis = array('texto' => $texto, 'noticia' => $noticia, 'outrasNoticias' => $outrasNoticias); self::renderizar(self::$viewController); }