public function display($clear_assign = true)
 {
     $this->view->cache($this->cache_time);
     if ($this->cache_time && $this->isCached()) {
         return $this->view->fetch($this->getTemplate(), $this->cache_id);
     } else {
         if (!$this->cache_time && $this->cache_id) {
             $this->view->clearCache($this->getTemplate(), $this->cache_id);
         }
         $this->execute();
         $result = $this->view->fetch($this->getTemplate(), $this->cache_id);
         if ($clear_assign) {
             $this->view->clearAllAssign();
         }
         return $result;
     }
 }
Ejemplo n.º 2
0
 public function __construct(waSystem $system, $options = array())
 {
     parent::__construct($system, $options);
     $this->template_dir = isset($options['template_dir']) ? $options['template_dir'] : $system->getAppPath();
 }
Ejemplo n.º 3
0
 protected function prepare()
 {
     $this->setCompileId();
     parent::prepare();
 }
Ejemplo n.º 4
0
 protected function prepare()
 {
     $this->smarty->compile_id = isset($this->options['compile_id']) ? $this->system->getApp() . "_" . $this->options['compile_id'] : $this->system->getApp() . "_" . $this->system->getLocale();
     parent::prepare();
 }