Beispiel #1
0
 /**
  * Reset the controller so that all data in the input and output
  * buffers are cleared, any compiled template files are removed
  * and (optionally) the user session is destroyed
  * 
  * @param bool $clearSession (default = true)
  */
 protected function Reset($clearSession = true)
 {
     $this->SetUrl('');
     $this->SetRequestBody('');
     $this->ClearOutput();
     $this->ClearVars();
     $this->RemoveCompiledTemplateFiles();
     $re = GlobalConfig::GetInstance()->GetRenderEngine();
     if ($re) {
         $re->clearAll();
         $re->assign("ROOT_URL", GlobalConfig::$ROOT_URL);
         $re->assign("PHREEZE_VERSION", Phreezer::$Version);
         $re->assign("PHREEZE_PHAR", Phreezer::PharPath());
     }
     if ($clearSession) {
         $this->ClearCurrentUser();
     }
 }
Beispiel #2
0
 /**
  * @return IRenderEngine
  */
 function GetRenderEngine()
 {
     if ($this->render_engine == null) {
         $engine_class = self::$TEMPLATE_ENGINE;
         if (!class_exists($engine_class)) {
             require_once 'verysimple/Phreeze/' . $engine_class . '.php';
         }
         $this->render_engine = new $engine_class(self::$TEMPLATE_PATH, self::$TEMPLATE_CACHE_PATH);
         $this->render_engine->assign("ROOT_URL", self::$ROOT_URL);
         $this->render_engine->assign("PHREEZE_VERSION", Phreezer::$Version);
         $this->render_engine->assign("PHREEZE_PHAR", Phreezer::PharPath());
     }
     return $this->render_engine;
 }