Esempio n. 1
0
 /**
  */
 public function tearDown()
 {
     if (!$this->useTemplate) {
         return;
     }
     if ($this->template->filename === null) {
         $tplPath = sprintf(MODULE_TEMPLATES, $this->divPath);
         $tplName = $tplPath . $this->_method . '.php';
         if (file_exists($tplName)) {
             $this->template->load($tplName);
         }
     }
     if (!$this->useBackbone) {
         if ($this->template->filename === null) {
             throw new \Exception('template not loaded.');
         }
         $this->_response = $this->template->compile();
         return;
     }
     $this->setUpLayout();
     $this->_response = Layout::compile($this->template->filename !== null ? $this->template->compile() : (DEBUG ? 'DEBUG Info: template not autoloaded.<br/> no such file: ' . str_replace(ROOT, '', $tplName) : ''));
 }