This method returns the assets url

@param null
@return string $url the assets url for this application
@throws this method does not throw an error
16904
public static function assets($assetName = null)
	{
		//get the server name from global $_SERVER[] array()
		$base  = $_SERVER['SERVER_NAME']; 

		$url = Registry::getUrl();

		//check if there is a uri string
		if ( ! empty($url) ) 
		{
			//prepend installation folder to server name
			$base .= substr($_SERVER['REQUEST_URI'], 0,  strpos($_SERVER['REQUEST_URI'], Registry::getUrl()));

		}
		//there is no query string, 
		else
		{
			//prepend installation folder to server name
			$base .= substr($_SERVER['REQUEST_URI'], 0);

		}


    	//use https if its defined in the $_SERVER global variable
    	$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") ? "https" : "http";

		//compose the url string
		return $protocol . '://' . $base . 'public/' . $assetName;

	}
76639
public function url($url = null)
    {
        if ($url) {
            $command = $this->getDriver()->factoryCommand('url', WebDriver_Command::METHOD_POST, ['url' => $url]);
            //protect slowest pages and lost selenium connection
            try {
                $this->getDriver()->curl($command);
            } catch (WebDriver_NoSeleniumException $mainException) {
                if (!$this->config()->get(WebDriver_Config::IMPROVED_URL_OPEN)) {
                    throw $mainException;
                }
                try {
                    $currentUrl = $this->url();
                    $partCheck = [PHP_URL_PATH, PHP_URL_QUERY, PHP_URL_HOST];
                    $isEqual = true;
                    foreach ($partCheck as $urlPart) {
                        if (parse_url($url, $urlPart) != parse_url($currentUrl, $urlPart)) {
                            var_dump(parse_url($url, $urlPart));
                            $isEqual = false;
                        }
                    }
                    if (!$isEqual) {
                        throw $mainException;
                    }
                } catch (WebDriver_NoSeleniumException $e) {
                    throw $mainException;
                }
            }
        } else {
            $result = $this->getDriver()->curl(
                $this->getDriver()->factoryCommand('url', WebDriver_Command::METHOD_GET)
            );
            return $result['value'];
        }
    }
309231
protected function getUrl()
    {
        $url = $this->path['url'];

        $uri    = is_array($url) ? $url[0] : $url;
        $params = is_array($url) ? array_slice($url, 1) : null;

        if (Utils::isAbsoluteUrl($uri)) {
            return $uri;
        }

        return url($uri, $params);
    }
1135998
protected function _url($url = null) {
		if ($url !== null) {
			return '/' . trim($url, '/');
		} elseif ($uri = $this->env('REQUEST_URI')) {
			list($uri) = explode('?', $uri, 2);
			$base = '/^' . preg_quote($this->_base, '/') . '/';
			return '/' . trim(preg_replace($base, '', $uri), '/') ?: '/';
		}
		return '/';
	}
448030
public function getUrl()
    {
        return $this->url && $this->token
            ? $this->url  . '?token=' . $this->token
            : null;
    }
974215
public function getUrl()
    {
        if($this->storage)
        {
            $this->save();

            return $this->storage->getUrl($this);
        }

        return NULL;
    }
809645
public function getUrl($width=null, $height=null)
    {

        if ($width || $height) {
            return $this->urlForSize($width, $height);

        }

        if (!$this->url) {
            $this->url = new Url($this->__get('url'));
        }

        return $this->url;

    }
675157
public function asset(string $path, string $assetSite = null): string
    {
        if (strlen($path) == 0) {
            throw new \InvalidArgumentException('Expected non-empty string');
        }

        // if you pass the full URL that contains "//" part, it'll be immediately
        // returned without any kind of building or parsing

        $pos = strpos($path, '//');
        if (($pos !== false && $pos < 10) || substr($path, 0, 2) == '//') {
            return $path;
        }

        $assets = Application::getConfig('application')->get('assets') ?? [];

        if ($path[0] != '/') {
            $path = '/' . $path;
        }

        $url = null;

        if ($assetSite != null) {
            if (isset($assets[$assetSite])) {
                $url = $assets[$assetSite];
            } else {
                $backtrace = debug_backtrace();
                $caller = $backtrace[1]['function'] ?? '[unknown caller]'; // TODO: Possible fix needed
                Log::warning("Asset site {$assetSite} is used in {$caller}, but not set in application config; using first asset site if any");

                if (count($assets) > 0) {
                    $url = array_values($assets)[0];
                }
            }
        } else {
            if (count($assets) > 0) {
                $url = array_values($assets)[0];
            }
        }

        if ($url == null) {
            return static::makeUrl($path);
        } else {
            if (substr($url, -1) != '/') {
                $url .= '/';
            }

            if (substr($path, 0, 1) == '/') {
                $path = substr($path, 1);
            }

            return $url . $path;
        }
    }
1007296
public function url(string $url = null) : self
    {
        if (! $url) {
            $url = null;

            $httpHost = getenv('APP_URL'); // Has to start with a protocol - for example "http://"!

            if ($httpHost === false) {
                $url = 'http';

                // Quick and dirty
                if (isset($_SERVER['HTTPS'])) {
                    $url .= 's';
                }

                $url .= '://';

                $httpHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost/';
            }  

            $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
            
            $safeRequestURI = htmlentities(strip_tags(urldecode($requestUri)));

            $url .= "{$httpHost}{$safeRequestURI}";
        } 

        if ($this->validate and ! filter_var($url, FILTER_VALIDATE_URL)) {
            throw new Exception("Open Graph: Invalid URL '{$url}'");
        }

        $this->forget('url');

        $this->tags[] = $this->createTag('url', $url);

        return $this;
    }
446285
protected function resolveAssets(): ?string
    {
        $module = $this->getModuleInfo();
        if (!isset($module['assets'])) {
            return null;
        }
        $directory = $this->directory() . DIRECTORY_SEPARATOR . trim($module['assets'], DIRECTORY_SEPARATOR);
        return is_dir($directory) ? realpath($directory) : null;
    }
762048
public function getUrl() : ?string
    {
        $this->url = $this->getCache()->get($this->getKey())['location'] ?? null;

        if ( ! $this->url) {
            throw new FileException('File not found.');
        }

        return $this->url;
    }
1031762
protected function getAssetBaseUrl()
    {
        $baseUrl = $this->hasOption(self::BASE_OPTION_KEY) ? $this->getOption(self::BASE_OPTION_KEY) : ROOT_URL;

        $baseUrl = trim($baseUrl);
        if(substr($baseUrl, -1) != '/'){
            $baseUrl .= '/';
        }

        return $baseUrl;
    }
711386
public function getUrl() : Url
  {
    return Url::from(
      $this->getHttpScheme() . '://' . $this->getHost() . $this->server('REQUEST_URI')
    );
  }
769672
public function getAssetURL()
    {
        if (!$this->assetHasBeenMapped) {
            $this->mapAssetLocation($this->location);
        }
        $result = $this->assetURL;
        if ($result && $this->isAssetLocal() && !preg_match('/\?(.*&)?' . preg_quote(static::OUTPUT_NOCACHE_PARAM, '/') . '=/', $result)) {
            if ($this->pkg) {
                $noCacheValue = $this->pkg->getPackageVersion();
            } else {
                $app = Application::getFacadeApplication();
                $config = $app->make('config');
                $noCacheValue = $config->get('concrete.version_installed') . '-' . $config->get('concrete.version_db');
            }
            $noCacheValue = $this->obfuscateNoCacheValue($noCacheValue);
            $result .= (strpos($result, '?') === false ? '?' : '&') . static::OUTPUT_NOCACHE_PARAM . '=' . rawurlencode($noCacheValue);
        }

        return $result;
    }
363371
public function getAssetPath()
    {
        $path = $this->assetsHelper->getUrl('');

        if ($path[strlen($path) - 1] === '/') {
            $path = rtrim($path, '/');
        }

        return $path;
    }
276295
public function getSiteUrl()
    {
        $url = clone $this->getBaseUrl();

        if(JFactory::getApplication()->getName() == 'administrator')
        {
            // Replace the application name only once since it's possible that
            // we can run from http://localhost/administrator/administrator
            $i    = 1;
            $path = str_ireplace('/administrator', '', $url->getPath(), $i);
            $url->setPath($path);
        }

        return $url;
    }
58063
public function getUrlAttribute()
    {
        if ($this->url === null) {
            $this->url = $this->makeUrl();
        }

        return $this->url;
    }