public function url($url)
    {
        if (is_string($url)) {
            $url = $this->localePrefix($url);
        }

        try {
            $url = Router::url($url, true);
        } catch (\Exception $ex) {
            $url = '';
        }

        return $url;
    }
public function url($url)
    {
        if (is_string($url)) {
            $url = $this->localePrefix($url);
        }

        try {
            $url = Router::url($url, true);
        } catch (\Exception $ex) {
            $url = '';
        }

        return $url;
    }
public function url ( $ url ) { if ( is_string ( $ url ) ) { $ url = $ this -> localePrefix ( $ url ) ; } try { $ url = Router :: url ( $ url , true ) ; } catch ( \ Exception $ ex ) { $ url = '' ; } return $ url ; }
Returns a safe URL string for later use with HtmlHelper.

@param string|array $url URL given as string or an array compatible
with `Router::url()`
@return string
Returns a safe URL string for later use with HtmlHelper .