Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
 function __construct()
 {
     $this->_config = Core::getConfig();
 }