Renvoit la racine de l'URL

@return string
352767
public function getUrlRacine()
    {
        $protocol = empty($_SERVER["HTTPS"])?"http":"https";
        if (isset($_SERVER["SERVER_NAME"])) {
            $dirname=dirname($_SERVER["PHP_SELF"]);
            if (basename($dirname)=="script") {
                $dirname = dirname($dirname);
            }
        } else {
            $dirname="";
        }
        $url =$protocol."://".$this->getNomServeur().
        $dirname;
        if ($dirname!="/") {
            $url.="/";
        }
        return $url;
    }
792146
public function URL()
    {
        $p = $this->parse();
        $link = '';

        $link .= (!empty($p['scheme'])) ? $p['scheme'] . '://' : false;
        $link .= (!empty($p['user'])) ? $p['user'] . ':' : false;
        $link .= (!empty($p['pass'])) ? $p['pass'] . '@' : false;
        $link .= (!empty($p['host'])) ? $p['host'] : false;
        $link .= (!empty($p['path'])) ? $p['path'] : false;
        if (!empty($p['query'])) {
            parse_str($p['query'], $get_array);
            $link .= '?' . http_build_query($get_array, '', '&amp;');
        }
        $link .= (!empty($p['fragment'])) ? '#' . $p['fragment'] : false;

        return $link;
    }
858641
protected function getBaseUrl()
    {
        $port = '';
        if ($this->requestContext->getScheme() === 'https' && $this->requestContext->getHttpsPort() != 443) {
            $port = ":{$this->requestContext->getHttpsPort()}";
        }

        if ($this->requestContext->getScheme() === 'http' && $this->requestContext->getHttpPort() != 80) {
            $port = ":{$this->requestContext->getHttpPort()}";
        }

        $baseUrl = $this->requestContext->getBaseUrl();
        if (substr($this->requestContext->getBaseUrl(), -4) === '.php') {
            $baseUrl = pathinfo($this->requestContext->getBaseurl(), PATHINFO_DIRNAME);
        }
        $baseUrl = rtrim($baseUrl, '/\\');

        return sprintf(
            '%s://%s%s%s',
            $this->requestContext->getScheme(),
            $this->requestContext->getHost(),
            $port,
            $baseUrl
        );
    }
805108
public function getUrl()
    {
        $proto = $this->getUrlProto();
        $host = $this->getUrlHost();
        $port = $this->getUrlPort($proto);
        

        $url = $proto . '://' . $host;
        if (($proto == 'https' && $port != 443) || ($proto == 'http' && $port != 80)) {
            $url .= ':' . $port;
        }

        if (isset($_SERVER)) {
            $path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
            $url .= $path;
        }

        if ($host == 'unknown') {
            $url = null;
        }

        return $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"];
    }
1337947
public function getUrl()
    {
        $legacyKernel = Eresus_Kernel::app()->getLegacyKernel();
        /** @var TClientUI $page */
        $page = Eresus_Kernel::app()->getPage();
        /* У разделов типа 'url' собственный механизм построения URL */
        if ('url' == $this->data['type'])
        {
            $item = $legacyKernel->sections->get($this->data['id']);
            $url = $page->replaceMacros($item['content']);
            if (substr($url, 0, 1) == '/')
            {
                $url = $legacyKernel->root . substr($url, 1);
            }
        }
        else
        {
            $url = $page->clientURL($this->data['id']);
            if ($legacyKernel->root . 'main/' == $url)
            {
                $url = $legacyKernel->root;
            }
        }

        return $url;
    }
353382
public function get_normalized_http_url() {

        $parts = parse_url($this->http_url);

        $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
        $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
        $host = (isset($parts['host'])) ? strtolower($parts['host']) : '';
        $path = (isset($parts['path'])) ? $parts['path'] : '';

        if (($scheme == 'https' && $port != '443')
            || ($scheme == 'http' && $port != '80')) {
            $host = "$host:$port";
        }

        return "$scheme://$host$path";

    }
702783
public static function getCurrentUrlNoParam(){
		$url = self::getCurrentUrl();
		if(strstr($url,"#")){
			$url = substr($url,0,strpos($url,"#"));
		}
		
		if(strstr($url,"?")){
			$url = substr($url,0,strpos($url,"?"));
		}
		return $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);
    }
1302834
public function getHref() {

		if(is_null($this->href)) {

			if($this->localPage) {

				$pathSegments = [];
				$e = $this;

				do {
					$pathSegments[] = $e->path;
				} while ($e = $e->menu->getParentEntry());

				if(Application::getInstance()->getRouter()->getServerSideRewrite()) {

					if(($script = basename($this->menu->getScript(), '.php')) == 'index') {
						$script = '/';
					}

					else {
						$script = '/'. $script . '/';
					}
				}

				else {
					$script = '/' . $this->menu->getScript() . '/';
				}

				$this->href = $script . implode('/', array_reverse(array_map('rawurlencode', $pathSegments)));

			}

			else {

				$this->href = $this->path;

			}
		}

		return $this->href;
	}
1315950
public function createUrl() {
    $string_data = $this->dataToString();
    $data_to_send = array(
      'hash' => $this->doHash($string_data),
    );
    // Adicionalmente adjuntamos el resto de los valores iniciados en $data
    foreach ($this->data as $name => $value) {
      $data_to_send[$name] = $value;
    }
    $data_to_send['agent'] = $this->agent;

    // Iniciamos CURL
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $this->apiUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_to_send);

    $output = curl_exec($ch);
    $info = curl_getinfo($ch);
    curl_close($ch);
    if ($info['http_code'] == 200) {
      return $output;
    }
    else {
      return FALSE;
    }
  }
394386
public function getUrl()
    {
        $url = $this->getScheme() . '://' . $this->getHost();
        if (($this->getScheme() === 'https' && $this->getPort() !== 443) || ($this->getScheme() === 'http' && $this->getPort() !== 80)) {
            $url .= sprintf(':%s', $this->getPort());
        }

        return $url;
    }
1291782
public function getHref()
    {
        $uri = $this->getUri();
        
        $fragment = $this->getFragment();       
        if (null !== $fragment) {
            if ('#' == substr($uri, -1)) {
                return $uri . $fragment;
            } else {                
                return $uri . '#' . $fragment;
            }
        }
        
        return $uri;
    }
287503
public function urlPrefix()
    {
        if (!isset($this->urlPrefix) || !$this->urlPrefix) {
            return str_slug($this->getPluralTitle());
        }

        return $this->urlPrefix;
    }
959651
public function getUrl()
  {
      $url = $this->baseAuthUrl;
      $url .= '?response_type=code';
      $url .= '&client_id='.$this->clientId;
      $url .= '&redirect_uri='.$this->redirectUri;
      $url .= '&scope='.implode(' ', $this->scopes);
      $url .= '&state='.$this->state;

      return $url;
  }
249026
public static function curPHPUrl() {
        $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
              ? 'http'
              : 'https';
        $port = "";
        if ( isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != "80" && $_SERVER['SERVER_PORT'] != "443" &&
            strpos(':', $_SERVER['HTTP_HOST']) < 0 ) {
            $port =  ':' . $_SERVER['SERVER_PORT'] ;
        }
        $http_url = $scheme .
                              '://' . $_SERVER['HTTP_HOST'] .
                              $port .
                              $_SERVER['REQUEST_URI'];
        return $http_url;
    }
603342
public function getEvidenceURL()
    {
        $evidenceUrl = $this->url.$this->prefix.$this->company;
        $evidence    = $this->getEvidence();
        if (!empty($evidence)) {
            $evidenceUrl .= '/'.$evidence;
        }
        return $evidenceUrl;
    }