Exemple #1
0
 /**
  * Renders a exception/error template
  *
  * @param array $args
  */
 protected static final function renderException($args)
 {
     Buffer::clear(true);
     /**
      * Set header status code
      */
     Header::set(500, false);
     /**
      * Reset all to the default
      */
     $activeProject = ProjectManager::getActiveProject();
     if ($activeProject) {
         $activeProject->setActive(false);
     }
     Locale::set(DEFAULT_LOCALE);
     /**
      * Render with the exception layout
      */
     self::renderTemplate(EXCEPTION_LAYOUT, $args, true);
     exit;
 }
Exemple #2
0
 /**
  * Redirects the user
  *
  * @param  string $location
  */
 public static function redirect($location)
 {
     Buffer::clear(true);
     header("Location: " . $location);
     exit;
 }