Beispiel #1
0
 public static function to($location, $status = null)
 {
     if (is_int($status)) {
         Header::status($status);
     }
     header('Location: ' . $location);
     exit;
 }
Beispiel #2
0
 /**
  * @static
  * @return void
  */
 public static function to404()
 {
     $defaultController = Core::$application->getModule()->defaultController;
     $controller = new $defaultController();
     Header::http("1.0 404 Not Found");
     Header::status("404 Not Found");
     Core::execute($controller, Core::$application->getModule()->action404);
     Core::endApplication();
 }
Beispiel #3
0
 public static function error($error_code)
 {
     Header::status($error_code);
     if (!defined('PAGE_CONTROLLER')) {
         define('PAGE_CONTROLLER', 'error');
         define('PAGE_ACTION', $error_code);
     }
     return View::make('error.' . $error_code);
 }