public function loadTemplate($name)
 {
     //set view so that exception can be thrown without setting template_name
     sgView::getInstance()->loadTemplate("{$name}.html");
     $this->template_structure = explode('/', $name);
     $this->template_name = end($this->template_structure);
 }
示例#2
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }