Example #1
0
 /**
  * render's a fata error using the built-in view. This is currently only
  * used when the database connection fails
  * @access public
  * @param string $title
  * @param string $error
  * @return void
  */
 public function renderError($title, $error, $errorObj = null)
 {
     $innerContent = $error;
     $titleContent = $title;
     header('HTTP/1.1 500 Internal Server Error');
     if (!isset($this) || !$this) {
         $v = new View();
         $v->setThemeForView(DIRNAME_THEMES_CORE, FILENAME_THEMES_ERROR . '.php', true);
         include $v->getTheme();
         exit;
     }
     if (!isset($this->theme) || !$this->theme || !file_exists($this->theme)) {
         $this->setThemeForView(DIRNAME_THEMES_CORE, FILENAME_THEMES_ERROR . '.php', true);
         include $this->theme;
         exit;
     } else {
         Loader::element('error_fatal', array('innerContent' => $innerContent, 'titleContent' => $titleContent));
     }
 }