/**
  * @Override 
  */
 public function render()
 {
     $file = Atto::makeAccessPath(array(Atto::dir_error(), Atto::dir_atto_error()), array($this->status, 'etc'), array('.html', '.php'));
     $this->error_message = $this->getMessage();
     $this->title = $this->status . '  ' . AttoHttpHelper::getTextByResponseCode($this->status);
     AttoHttpHelper::setResponseCode($this->status);
     include $file;
 }
Пример #2
0
 /**
  * @Override 
  */
 public function render()
 {
     if (is_file($this->view)) {
         ob_start();
         include $this->view;
         if ($this->layout) {
             $this->content_for_layout = ob_get_clean();
             ob_start();
             include Atto::makeAccessPath(array(Atto::dir_layout(), '', Atto::dir_atto_layout()), array($this->layout, 'default'), array('', '.php'));
         }
         ob_end_flush();
     }
 }
 /**
  * ___view___
  *
  * @method ___view___
  * @param {string} $viewFile
  * @return {string} content
  */
 protected function ___view___($viewFile)
 {
     ob_start();
     if (isset($this->cache_read) && $this->cache_read) {
         include $this->cache_file;
     } else {
         include $viewFile;
     }
     if ($this->layout) {
         $this->content_for_layout = ob_get_clean();
         ob_start();
         include Atto::makeAccessPath(array(Atto::dir_layout(), '', Atto::dir_atto_layout()), array($this->layout, 'default'), array('', '.php'));
     }
     return ob_get_clean();
 }