public static function run() { //Suprimir Warnings error_reporting(E_WARNING); //$template = file_get_contents('app.view/template.class.php'); $template = new template(); ob_start(); $template->show(); $template = ob_get_contents(); ob_get_clean(); $content = ''; /* * Se tiver parametros na URL, carrega a classe */ if ($_GET) { $class = $_GET['class']; if (class_exists($class)) { $pagina = new $class(); ob_start(); $pagina->show(); $content = ob_get_contents(); ob_end_clean(); } } else { $pagina = new curriculum(); ob_start(); $pagina->show(); $content = ob_get_contents(); ob_end_clean(); } /* * Susbstitui a string #CONTENT# do template para a pagina principal */ $site = str_replace('#CONTENT#', $content, $template); echo $site; echo "<script>\r\n\t\t\trefreshScroller();\r\n\t\t</script>"; }