Returns the normalized URL as {@link URL}.
@return URI
771291
public URL toURL() {
        if (StringUtils.isBlank(url)) {
            return null;
        }
        try {
            return new URL(url);
        } catch (MalformedURLException e) {
            logger.info("URL does not appear to be valid and cannot be parsed:"
                    + url, e);
            return null;
        }
    }
861418
public function getUrl()
    {
        if ($this->idcat < 0) return false;     
        $url = '/'.$this->_alias;             
        if ( $this->getCatalog()->isServer() ) return $url;                   
        return rtrim($this->getCatalog()->getUrl(),'/').$url;
    }
554641
public function url()
    {
        if (empty($parameters = func_get_args())) {
            return $this->to('/');
        }

        $path = array_shift($parameters);

        $result = preg_replace_callback('#\{(\d+)\}#', function ($matches) use ($parameters)
        {
            list ($value, $key) = $matches;

            return isset($parameters[$key]) ? $parameters[$key] : $value;

        }, $path);

        return $this->to($path);
    }
68462
public function getUrl() {
        $config     = $this->getConfig();
        $baseUrl    = $this->isReadOnly()
            ? $config->getReadBaseUrl()
            : $config->getWriteBaseUrl()
        ;
        $index      = $config->getIndex();
        $path       = $this->getPath();

        $url        = $baseUrl . '/' . $index . $path;

        return $url;
    }
939148
private function uriTrim() {
		$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
		$uri = trim($uri, '/\^$');
		if(strpos($uri,'?')) $uri = substr($uri,0,strpos($uri,'?'));
		return $uri;
	}
711386
public function getUrl() : Url
  {
    return Url::from(
      $this->getHttpScheme() . '://' . $this->getHost() . $this->server('REQUEST_URI')
    );
  }
969123
public function getUri()
    {
        if ($this->uri === null) {
            if ($this->uriProvider !== null) {
                $this->uri = ($this->uriProvider)();
            } else {
                $this->uri = new Uri();
            }
        }
        return $this->uri;
    }
455800
public function getUrl()
    {
        if (empty($this->url)) {
            $url = $this->httpRequest()->getCurrentUrl(true)->getPath();
            // we need to have the trailing slash because of the match inside matchRequest
            // and also when matching the default method, we can do an incorrect match if we don't have the start and end slash
            $this->url = $this->str($url)->trimRight('/')->val() . '/';
        }

        return $this->url;
    }
947314
public function getUri()
    {
        if (!$this->uri)
            $this->uri = new Uri($this->httpMessage->getTarget());
        
        return $this->uri;
    }
224026
public function getHostRelativeUrl()
    {
        $url = $this->getPath();
        if ($this->hasQueryString()) $url .= '?' . $this->getQueryString();
        if ($this->hasFragmentString()) $url .= '#' . $this->getFragmentString();
        return $url;
    }
938667
public function getUrlBase() : string
    {
        $url = sprintf('%s://%s', $this->getScheme(), $this->host);
        $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80));

        return $isStandardPort ? $url : $url . ':' . $this->port;
    }
457708
protected static function getRequestUrl()
    {
        $hostname = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null);

        if(isset($hostname))
        {
            $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';

            if(!isset($_SERVER['REQUEST_URI']))
            {
                if(isset($_SERVER['QUERY_STRING']))
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
                }
                else
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'];
                }
            }
            else
            {
                return $protocol . '://' . $hostname . $_SERVER['REQUEST_URI'];
            }
        }
        else
        {
            return null;
        }
    }
821551
public function getUrlPK()
    {
        if ($this->urlPK == null) {
            $this->urlPK = $this->getPrimaryKey();
        }

        return $this->urlPK;
    }
542948
public function getUrlAttribute()
    {
        return url(trim(($this->parent ? $this->parent->full_slug : '').'/'.$this->slug, '/'));
    }
413467
public function getUri()
    {
        if ($this->routeGenerated) {
            return $this->routeGenerated;
        }

        if ($this->routeName !== null) {
            return $this->routeGenerated = $this->urlGenerator->generate($this->routeName, $this->routeParams);
        }

        if (strpos($this->uri, '/') === 0 || !$this->parent) {
            return $this->routeGenerated = $this->uri;
        }

        $parentUri = $this->parent ? $this->parent->getUri() : null;
        if ($parentUri === null) {
            return $this->routeGenerated = $this->uri;
        }

        $routeGenerated = new Uri($parentUri);
        $routeGenerated = $routeGenerated->withPath($routeGenerated->getPath() . '/' . $this->uri);

        return $this->routeGenerated = (string) $routeGenerated;
    }
1034669
public static function GetUrl () {
		return static::LasyClassVarAccessCallback('url', function () {return sprintf('%s://%s%s%s', strtolower(static::GetCurrnetProtocol()), static::GetDomainName(), static::GetPath(), !empty($query_parameter = static::GetParameters()->getRecursiveArrayCopy()) ? sprintf('?%s', http_build_query($query_parameter)) : '');});
	}
300017
public function getURL(): ?string
    {
        if ($this->base !== null) {
            $list = [];
            $queryList = $this->query->getList();
            foreach ($queryList as $queryItem) {
                $list[$queryItem->name] = $queryItem->value;
            }
            return $this->base . implode('/', array_map('urlencode', explode('/', (string) $this->path))) . (empty($list) ? '' : '?' . http_build_query($list));
        }
        return null;
    }