From c145e6cbaac90eeae1364923def4a4a3e076a89f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 10:01:00 -0500 Subject: [PATCH] Refactor the URL class. --- system/url.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/url.php b/system/url.php index 20a3c874..04c239b8 100644 --- a/system/url.php +++ b/system/url.php @@ -14,10 +14,7 @@ class URL { */ public static function to($url = '', $https = false, $asset = false) { - if (filter_var($url, FILTER_VALIDATE_URL) !== false) - { - return $url; - } + if (filter_var($url, FILTER_VALIDATE_URL) !== false) return $url; $base = Config::get('application.url').'/'.Config::get('application.index'); @@ -127,13 +124,11 @@ public static function __callStatic($method, $parameters) { $parameters = (isset($parameters[0])) ? $parameters[0] : array(); - // Dynamically create a secure route URL. if (strpos($method, 'to_secure_') === 0) { return static::to_route(substr($method, 10), $parameters, true); } - // Dynamically create a route URL. if (strpos($method, 'to_') === 0) { return static::to_route(substr($method, 3), $parameters);