Returns the URL to this Piwik instance, eg. **http://demo.piwik.org/** or **http://example.org/piwik/**.

@return string
@api
773281
public static function getPiwikUrl()
    {
        $url = Option::get(self::OPTION_PIWIK_URL);

        $isPiwikCoreDispatching = defined('PIWIK_ENABLE_DISPATCH') && PIWIK_ENABLE_DISPATCH;
        if (Common::isPhpCliMode()
            // in case core:archive command is triggered (often with localhost domain)
            || SettingsServer::isArchivePhpTriggered()
            // When someone else than core is dispatching this request then we return the URL as it is read only
            || !$isPiwikCoreDispatching
        ) {
            return $url;
        }

        $currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());

        // when script is called from /misc/cron/archive.php, Piwik URL is /index.php
        $currentUrl = str_replace("/misc/cron", "", $currentUrl);

        if (empty($url)
            // if URL changes, always update the cache
            || $currentUrl != $url
        ) {
            $host = Url::getHostFromUrl($currentUrl);

            if (strlen($currentUrl) >= strlen('http://a/')
                && !Url::isLocalHost($host)) {
                self::overwritePiwikUrl($currentUrl);
            }
            $url = $currentUrl;
        }

        if (ProxyHttp::isHttps()) {
            $url = str_replace("http://", "https://", $url);
        }
        return $url;
    }
751107
public function url()
    {
        $dirname = $this->parent->url();

        if ($this->parent instanceof Root) { //at root

            return $dirname.$this->basename();
        }

        return sprintf('%s/%s', $dirname, $this->basename());

    }
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;
    }
182177
public function getUrl()
    {
        $url = $this->getSignatureUrl();

        if (!$this->hasGetParameters()) {
            return $url;
        }

        $query = array();
        foreach ($this->getGetParameters() as $name => $value) {
            $query[] = sprintf('%s=%s', $name, $value);
        }

        return $url.'?'.implode('&', $query);
    }
1063960
public function get_url() {
        return \core_competency\url::user_competency_in_plan($this->relateduserid, $this->other['competencyid'],
            $this->other['planid']);
    }
267287
protected function getUrl()
    {

        if (!($this->secure && $this->sandbox)) {
            return static::HTTP_URL;
        } else if (!$this->secure && $this->sandbox) {
            return static::SANDBOX_HTTP_URL;
        } else if ($this->secure && $this->sandbox) {
            return static::SANDBOX_HTTPS_URL;
        } else {
            return static::HTTPS_URL;
        }
    }
123466
public function getUrl()
    {
        $https = $this->isHTTPS();

        $protocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
        $protocol = substr($protocol, 0, strpos($protocol, "/")) . ($https ? "s" : "");

        $port = $_SERVER["SERVER_PORT"];
        $port = ($port == 80 && !$https) || ($port == 443 && $https) ? "" : ":$port";

        $host = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : null;
        $host = $host ? $host : $_SERVER["SERVER_NAME"] . $port;

        return "$protocol://$host" . $_SERVER["REQUEST_URI"];
    }
53635
private function getLink()
    {
        $linkConfig = $this->config['link'];

        if (is_string($linkConfig) || isset($linkConfig['uri'])) {
            return (is_string($linkConfig)) ? $linkConfig : $linkConfig['uri'];
        }

        return $this->router->generate($linkConfig['route_name'], $linkConfig['route_params'], UrlGeneratorInterface::ABSOLUTE_URL);
    }
262272
public function getUrlHost()
    {
        $host = '';
        
        if (!empty($_SERVER['HTTP_FORWARDED'])) {
            extract($this->parseForwardedString($_SERVER['HTTP_FORWARDED']));
        }
        
        if (empty($host)) {
            if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
                $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
            } elseif (!empty($_SERVER['HTTP_HOST'])) {
                $parts = explode(':', $_SERVER['HTTP_HOST']);
                $host = $parts[0];
            } elseif (!empty($_SERVER['SERVER_NAME'])) {
                $host = $_SERVER['SERVER_NAME'];
            } else {
                $host = 'unknown';
            }
        }
        
        return $host;
    }
927292
public function getUrlAttribute()
    {
        if ($this->isLocalFile()) {
            return url(str_replace('public/', 'storage/', $this->location));
        } elseif ($this->fileExists()) {
            return $this->getS3Image();
        }

        return $this->lostImage();
    }
655684
public function get_url() {
        if ($this->other['forumtype'] == 'single') {
            // Single discussion forums are an exception. We show
            // the forum itself since it only has one discussion
            // thread.
            $url = new \moodle_url('/mod/forum/view.php', array('f' => $this->other['forumid']));
        } else {
            $url = new \moodle_url('/mod/forum/discuss.php', array('d' => $this->other['discussionid']));
        }
        $url->set_anchor('p'.$this->objectid);
        return $url;
    }
821551
public function getUrlPK()
    {
        if ($this->urlPK == null) {
            $this->urlPK = $this->getPrimaryKey();
        }

        return $this->urlPK;
    }
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);
    }
1142494
public function getUrl()
	{
		$commentable = $this->commentable;

		$url = false;
		if (method_exists($commentable, 'getUrl'))
		{
			$url = $commentable->getUrl();
		}

		return \URL::to($url.'#C'.$this->id);
	}
304575
public function get_url() {

		/**
		 * Start by replacing ABSPATH with site_url.
		 * This is not accurate at all and only serves as a fallback in case everything else fails.
		 */
		$this->url = \str_replace( ABSPATH, \trailingslashit( \site_url() ), $this->path );

		/**
		 * If the file-path is inside wp-content replace the content-path with the content-url.
		 * This serves as a fallback in case the other tests below fail.
		 */
		if ( false !== \strpos( $this->path, self::$content_path ) ) {
			$this->url = \str_replace( self::$content_path, self::$content_url, $this->path );
		}

		/**
		 * If the file is in a parent theme use the template directory.
		 */
		if ( $this->in_parent_theme() ) {
			$this->url = \get_template_directory_uri() . \str_replace( \get_template_directory(), '', $this->path );
		}

		/**
		 * If the file is in a child-theme use the stylesheet directory.
		 */
		if ( ! $this->in_parent_theme() && $this->in_child_theme() ) {
			$this->url = \get_stylesheet_directory_uri() . \str_replace( \get_stylesheet_directory(), '', $this->path );
		}

		$this->url = \set_url_scheme( $this->url );
		return \apply_filters( 'kirki_path_url', $this->url, $this->path );
	}
404962
public function get_url() {
        $params = array('id' => $this->contextinstanceid);
        if (!empty($this->other['mode'])) {
            $params['mode'] = $this->other['mode'];
        }
        return new \moodle_url("/mod/$this->objecttable/view.php", $params);
    }
691287
public function getAppURL()
    {
        if (empty($this->appURL)) {
            $hostname = $this->getHostname();
            if (empty($hostname)) {
                $this->appURL = config('app.url');
            } else {
                $protocol = $this->getProtocol();
                $this->appURL = ($protocol ?: 'http') . '://' . $hostname . '/' . $this->getBaseDir();
            }
        }

        return $this->appURL;
    }