public static function to($location, $status = null) { if (is_int($status)) { Header::status($status); } header('Location: ' . $location); exit; }
/** * @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(); }
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); }