diff --git a/classes/Browser.php b/classes/Browser.php index e9a0f87..9462292 100644 --- a/classes/Browser.php +++ b/classes/Browser.php @@ -18,8 +18,8 @@ /** * Browser Utility Class * - * Just a simple collection of static functions to accomplish some of the more - * redundant browser-related tasks. + * Just a simple collection of static functions to accomplish some of the + * more redundant browser-related tasks. */ class Browser extends Object { @@ -104,10 +104,11 @@ class Browser extends Object /** * Redirect * - * Redirects the browser to another URL. Stops execution as to not run code - * erroneously due to output buffering. HTTP/1.1 request an absolute URI, - * hence the inclusion of the scheme, hostname and absolute path if :// is - * not found. Don't hate the player, hate the RFC. + * Redirects the browser to another URL. Stops execution as to not run + * code erroneously due to output buffering. HTTP/1.1 request an + * absolute URI, hence the inclusion of the scheme, hostname and + * absolute path if :// is not found. Don't hate the player, hate the + * RFC. * * @static * @param string $destination URL to redirect to @@ -124,14 +125,27 @@ class Browser extends Object exit; } + /** + * Go Home + * + * Alias for `Browser::redirect('/');` + * + * @static + */ + public static function goHome() + { + Browser::redirect('/'); + } + /** * Status * - * Pushes a status code to the browser. Some of these codes are site (420) - * and server (444) specific, some just for LOLs (418) and some that are - * still in draft (425) and subject to change. I wanted this to be a - * complete list and in the scenario that a code had multiple meanings, I - * favored a more recent RFC (424) even if merely a draft (451). + * Pushes a status code to the browser. Some of these codes are site + * (420) and server (444) specific, some just for LOLs (418) and some + * that are still in draft (425) and subject to change. I wanted this + * to be a complete list and in the scenario that a code had multiple + * meanings, I favored a more recent RFC (424) even if merely a draft + * (451). * * @static * @param integer status response code diff --git a/jar.php b/jar.php index 2f5c77a..1047a2b 100755 --- a/jar.php +++ b/jar.php @@ -323,8 +323,8 @@ class API_Tinychat extends API_Common /** * Browser Utility Class * - * Just a simple collection of static functions to accomplish some of the more - * redundant browser-related tasks. + * Just a simple collection of static functions to accomplish some of the + * more redundant browser-related tasks. */ class Browser extends Object { @@ -409,10 +409,11 @@ class Browser extends Object /** * Redirect * - * Redirects the browser to another URL. Stops execution as to not run code - * erroneously due to output buffering. HTTP/1.1 request an absolute URI, - * hence the inclusion of the scheme, hostname and absolute path if :// is - * not found. Don't hate the player, hate the RFC. + * Redirects the browser to another URL. Stops execution as to not run + * code erroneously due to output buffering. HTTP/1.1 request an + * absolute URI, hence the inclusion of the scheme, hostname and + * absolute path if :// is not found. Don't hate the player, hate the + * RFC. * * @static * @param string $destination URL to redirect to @@ -429,14 +430,27 @@ class Browser extends Object exit; } + /** + * Go Home + * + * Alias for `Browser::redirect('/');` + * + * @static + */ + public static function goHome() + { + Browser::redirect('/'); + } + /** * Status * - * Pushes a status code to the browser. Some of these codes are site (420) - * and server (444) specific, some just for LOLs (418) and some that are - * still in draft (425) and subject to change. I wanted this to be a - * complete list and in the scenario that a code had multiple meanings, I - * favored a more recent RFC (424) even if merely a draft (451). + * Pushes a status code to the browser. Some of these codes are site + * (420) and server (444) specific, some just for LOLs (418) and some + * that are still in draft (425) and subject to change. I wanted this + * to be a complete list and in the scenario that a code had multiple + * meanings, I favored a more recent RFC (424) even if merely a draft + * (451). * * @static * @param integer status response code