public $layout = "main";
public function template($content)
{
return require_once Logic::get() . "/views/layouts/" . $this->layout . ".php";
}
public function render($view, Array $params = NULL) {
if ($params !== NULL) {
extract($params);
}
ob_start();
if ( file_exists( Logic::get() . "/views/".$view.".php" ) ) {
require_once Logic::get() . "/views/".$view.".php";
}
return ob_get_clean();
}
$this->view->layout = 'news';
$this->view->template( $this->view->render( 'site/news/index', ["model" => $model, "msg" => $this->msg] ) );