Get the URL of the sitemap corresponding to the output file name.

@return string returns an empty string if the output file name is not under the web root
494134
public function getSitemapUrl()
    {
        $outputFilename = $this->getOutputFilename();
        if (strpos($outputFilename, DIR_BASE . '/') === 0) {
            $result = (string) $this->getSitemapGenerator()->resolveUrl([substr($outputFilename, strlen(DIR_BASE))]);
        } else {
            $result = '';
        }

        return $result;
    }
1225172
private static function getBaseUrl()
    {
        if (isset($_SERVER['SERVER_NAME'])) {
            $sProtocol = !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])
                == 'on' ? 'https' : 'http';
            return $sProtocol.'://'.$_SERVER['SERVER_NAME'];
        }
        return null;
    }
923788
public static function siteUrl()
    {
        $base_url = self::requestInstance()->getDeterminedScheme().'://'.self::requestInstance()->getServerName().':'.self::requestInstance()->getServerPort().self::getUri();

        return $base_url;
    }
287386
public function get()
    {
        $path = $this->getView()->getParam('this.permalink');
        $params = $this->getView()->getParams();
        $permalink = $this->getView()->getParam('this.permalink', null);

        $params = array_merge($params['site'], $params['page']);
        foreach ($params as $name => $param) {
            // apply only scalar params
            if (is_scalar($param)) {
                $path = str_replace(':' . $name, $this->normalize($param), $path);
            }
        }

        $path = rtrim($this->getView()->getOutputDir(), '/') . '/'
              . ltrim($path, '/');

        if (substr($path, -1) === '/') {
            $path .= 'index.html';
        } else if (is_null($permalink) && substr($path, -5) !== '.html') {
            $path .= '.html';
        }

        return $path;
    }
1193625
static public function getPathPrefix()
    {
        $ini = eZINI::instance();

        return $ini->hasVariable( 'SiteAccessSettings', 'PathPrefix' ) &&
            $ini->variable( 'SiteAccessSettings', 'PathPrefix' ) != ''
            ? eZURLAliasML::cleanURL( $ini->variable( 'SiteAccessSettings', 'PathPrefix' ) )
            : false;
    }
645765
public function getBaseUrl()
    {
        $baseUrl = $this->innerExtractor->getBaseUrl();
        $siteAccess = $this->masterRequest->attributes->get('siteaccess');
        if ($siteAccess instanceof SiteAccess && $siteAccess->matcher instanceof SiteAccess\URILexer) {
            $baseUrl .= $siteAccess->matcher->analyseLink('');
        }

        return $baseUrl;
    }
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;
    }
365910
public static function getBaseUrl()
    {
        $protocol = isset($_SERVER['HTTPS']) ? 'https' : 'http';
        $url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];

        // cut at last '/' (we dont want to see index.php)
        return substr($url, 0, strrpos($url, '/'));
    }
1080182
public function getUrl() {
		$url = $this->baseUrl . $this->name;
		
		if ($this->hashAppend) {
			$meta = $this->getMetadata();
			
			if ($meta !== false) {
				$url .= '?' . $meta->hash;
			}
		}
		
		return $url;
	}
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;
    }
242137
public function getMapFilePath()
    {
        return sprintf(
            '%s.php',
            $this->mapBasePath .
            DIRECTORY_SEPARATOR .
            $this->getLang().
            DIRECTORY_SEPARATOR .
            $this->getSystem()
        );
    }
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;
        }
    }
279699
public function getUrlPageName()
    {
        if (static::$urlPageName !== null) {
            return static::$urlPageName;
        }

        /*
         * Cache
         */
        $key = 'urlMaker'.$this->urlComponentName.crc32(get_class($this));

        $cached = Cache::get($key, false);
        if ($cached !== false && ($cached = @unserialize($cached)) !== false) {
            $filePath = array_get($cached, 'path');
            $mtime = array_get($cached, 'mtime');
            if (!File::isFile($filePath) || ($mtime != File::lastModified($filePath))) {
                $cached = false;
            }
        }

        if ($cached !== false) {
            return static::$urlPageName = array_get($cached, 'fileName');
        }

        /*
         * Fallback
         */
        $page = null;
        $useProperty = property_exists($this, 'urlComponentProperty');

        if ($useProperty) {
            $page = Page::whereComponent($this->urlComponentName, $this->urlComponentProperty, '1')->first();
        }

        if (!$useProperty || !$page) {
            $page = Page::withComponent($this->urlComponentName)->first();
        }

        if (!$page) {
            throw new ApplicationException(sprintf(
                'Unable to a find a primary component "%s" for generating a URL in %s.',
                $this->urlComponentName,
                get_class($this)
            ));
        }

        $baseFileName = $page->getBaseFileName();
        $filePath = $page->getFilePath();

        $cached = [
            'path'     => $filePath,
            'fileName' => $baseFileName,
            'mtime'    => @File::lastModified($filePath)
        ];

        Cache::put($key, serialize($cached), Config::get('cms.parsedPageCacheTTL', 1440));

        return static::$urlPageName = $baseFileName;
    }
623192
public function getUrl()
    {
        if (!$this->isSortable()) {
            return '';
        }

        $params = ['sort_key' => $this->key];

        if ($this->isSortKey()) {
            $params['sort_order'] = $this->request->input('sort_order') == 'desc' ? 'asc' : 'desc';
        }

        return '?'.http_build_query($params + $this->request->all());
    }
1318497
public function getUrl()
    {
        $urlParts = array_filter([$this->domain, $this->getNickname()]);

        return count($urlParts) ? implode('/', $urlParts) : null;
    }
927292
public function getUrlAttribute()
    {
        if ($this->isLocalFile()) {
            return url(str_replace('public/', 'storage/', $this->location));
        } elseif ($this->fileExists()) {
            return $this->getS3Image();
        }

        return $this->lostImage();
    }
78639
private function getFilePath()
    {
        $fullname = $this->fullName;
        $rootPath = Yii::getAlias('@webroot');

        if (substr($fullname, 0, 1) != '/') {
            $fullname = '/' . $fullname;
        }

        return $rootPath . $fullname;
    }