Back to PhocacartRoute class

Method getFullUrl

public static
getFullUrl
(mixed $url)

Method getFullUrl - Source code

public static function getFullUrl($url)
{
    $url = Route::_($url);
    $frontendUrl = str_replace(Uri::root(true) . '/administrator/', '', $url);
    $frontendUrl = str_replace(Uri::root(true), '', $frontendUrl);
    $frontendUrl = str_replace('\\', '/', $frontendUrl);
    //$frontendUrl 	= JUri::root(false). str_replace('//', '/', $frontendUrl);
    $frontendUrl = preg_replace('/([^:])(\\/{2,})/', '$1/', Uri::root(false) . $frontendUrl);
    return $frontendUrl;
}