static function includeTemplate($name, $pt_vars = array()) { $config = Core::getConfig(); $layout = $config->get("layout"); $file = APPFOLDER . "View/" . $layout->get("view_theme"); $file .= "/{$name}.php"; if (file_exists($file)) { if (!is_array($pt_vars)) { $pt_vars = array($pt_vars); } foreach ($pt_vars as $key => $var) { if (!in_array($key, \App\Helper::$_protected_symbols)) { ${$key} = $var; } } require_once $file; } }
function __construct() { $this->_config = Core::getConfig(); }