10 defined(
'JPATH_PLATFORM') or die;
27 private static $_router = null;
42 public static function _($url, $xhtml =
true, $ssl = null)
56 if ((strpos($url,
'&') !== 0) && (strpos($url,
'index.php') !== 0))
62 $uri = self::$_router->build($url);
63 $url = $uri->toString(array(
'path',
'query',
'fragment'));
66 $url = preg_replace(
'/\s/u',
'%20', $url);
84 $prefix = $uri->toString(array(
'host',
'port'));
88 $scheme = ((int) $ssl === 1) ?
'https' :
'http';
91 if (!preg_match(
'#^/#', $url))
97 $url = $scheme .
'://' . $prefix . $url;
102 $url = htmlspecialchars($url);