@param      $uri
@param bool $withBaseUrl

@return mixed
777378
public function getUri($uri, $withBaseUrl = true)
    {
        $baseUrl = $withBaseUrl ? $this->baseUrl : '';
        if (!is_array($uri)) {
            return $baseUrl.$uri;
        }
        list($uri, $vars) = $uri;
        $uri = $baseUrl.$uri;
        if (!is_array($vars)) {
            throw new InvalidArgumentException();
        }
        foreach ($vars as $key => $value) {
            $uri = str_replace('{'.$key.'}', $value, $uri);
        }

        return $uri;
    }
916515
public static function WebRoot($WithDomain = FALSE) {
      $WebRoot = Gdn::Request()->WebRoot();

      if ($WithDomain)
         $Result = Gdn::Request()->Domain().'/'.$WebRoot;
      else
         $Result = $WebRoot;

      return $Result;
   }
1235420
public function createUrlFromUri($uri)
    {
        $uri = ltrim($uri, '/');

        return empty($this->baseUrl)
            ? $this->app[\Illuminate\Contracts\Routing\UrlGenerator::class]->to($uri)
            : $this->baseUrl.$uri;
    }
419454
func (c *Config) WithBaseURL(rawurl string) *Config {
	baseURL, _ := url.Parse(rawurl)
	c.BaseURL = baseURL
	return c
}
479013
function parseUri(uri) {
  if (uri instanceof Array) {
    uri = eut(uri[0], uri[1]);
  }

  return baseUrl + uri;
}
634480
public function setBaseUrl($url)
    {
        if (substr($url, -1) != '/') {
            $url .= '/';
        }

        if (substr($url,-4,4) != 'api/') {
            $url .= 'api/';
        }

        $this->baseUrl = $url;

        return $this;
    }
1039670
public function currentPath($withQueryString = false)
    {
        if (is_string($this->uri)) {
            return $this->uri;
        }

        $path = $this->uri->getBasePath() . '/' . ltrim($this->uri->getPath(), '/');

        if ($withQueryString && '' !== $query = $this->uri->getQuery()) {
            $path .= '?' . $query;
        }

        return $path;
    }
666785
public function get(string $uri): Description
    {
        if (!$uri) {
            throw new \InvalidArgumentException("No document URI provided");
        }
        if ($this->basePath) {
            $uri = "$this->basePath/$uri";
        }
        if (!isset($this->specifications[$uri])) {
            $this->specifications[$uri] = $this->load($uri);
        }

        return $this->specifications[$uri];
    }
712860
static public function getBaseUrl($uri='')
	{
		$baseUrl  = static::getRootUrl();
		$baseUrl .= isset($_SERVER['SCRIPT_NAME']) ? dirname($_SERVER['SCRIPT_NAME']) : dirname(getenv('SCRIPT_NAME'));
		
		return rtrim(str_replace('\\', '/', $baseUrl), '/');
	}
1024831
public function getEmulatorBaseUri($baseUri, $emulatorHost = null)
    {
        if ($emulatorHost) {
            $baseUri = $this->emulatorBaseUri($emulatorHost);
        }

        return $baseUri;
    }
16451
public function base_uri(){
    	$uri = $this->uri();
		if (($strpos = strpos($uri, '?')) !== false) 
			$uri = substr($uri, 0, $strpos);
		return $uri;
    }
1194897
protected function _getFilterUrl($withLimit = true)
    {
        $url = [
            'plugin' => $this->request->getParam('plugin'),
            'controller' => $this->request->getParam('controller'),
            'action' => $this->request->getParam('action'),
        ];

        foreach($this->_passParams as $name => $value) {
            $url[$name] = $value;
        }

        if (!empty($this->request->getParam('sluggedFilter'))) {
            $url['sluggedFilter'] = $this->request->getParam('sluggedFilter');
        };

        $limit = $this->request->getData('l');

        if ($withLimit && !empty($limit) && $limit !== $this->paginationParams['defaultLimit']) {
            $url['?']['l'] = $limit;
        }

        return $url;
    }
573586
public function makeRelative($baseUri)
    {
        // Copy base URI, we should not modify it
        $baseUri = new static($baseUri);

        $this->normalize();
        $baseUri->normalize();

        $host     = $this->getHost();
        $baseHost = $baseUri->getHost();
        if ($host && $baseHost && ($host != $baseHost)) {
            // Not the same hostname
            return $this;
        }

        $port     = $this->getPort();
        $basePort = $baseUri->getPort();
        if ($port && $basePort && ($port != $basePort)) {
            // Not the same port
            return $this;
        }

        $scheme     = $this->getScheme();
        $baseScheme = $baseUri->getScheme();
        if ($scheme && $baseScheme && ($scheme != $baseScheme)) {
            // Not the same scheme (e.g. HTTP vs. HTTPS)
            return $this;
        }

        // Remove host, port and scheme
        $this->setHost(null)
             ->setPort(null)
             ->setScheme(null);

        // Is path the same?
        if ($this->getPath() == $baseUri->getPath()) {
            $this->setPath('');

            return $this;
        }

        $pathParts = preg_split('|(/)|', $this->getPath(), null,
                                PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
        $baseParts = preg_split('|(/)|', $baseUri->getPath(), null,
                                PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
        if ('/' !== $baseParts[count($baseParts) - 1]) {
            $baseParts[] = '/';
        }

        // Get the intersection of existing path parts and those from the
        // provided URI
        $matchingParts = array_intersect_assoc($pathParts, $baseParts);

        // Loop through the matches
        foreach ($matchingParts as $index => $segment) {
            // If we skip an index at any point, we have parent traversal, and
            // need to prepend the path accordingly
            if ($index && !isset($matchingParts[$index - 1])) {
                array_unshift($pathParts, '../');
                continue;
            }

            // Otherwise, we simply unset the given path segment
            unset($pathParts[$index]);
        }

        // Reset the path by imploding path segments
        $this->setPath(implode($pathParts));

        return $this;
    }
1077403
public function getBaseUrl($absolute = false)
    {
        $url = array();
        if ($absolute) {
            $url[] = $this->baseUrl !== null ? rtrim($this->baseUrl, '/') : Yii::app()->request->baseUrl;
        }
        $url[] = $this->fileDir;
        return rtrim(implode('/', $url), '/');
    }
538834
public static function GetBaseUriWithProvider( $context, $provider )
	{
		return ExtFuncs::GetBaseUri( $context, CoreFuncs::NodeValue( CoreFuncs::ContextNode( $provider ) ) );
	}
1075846
public function uri(
        $resolverPath,
        $attributes    = array(),
        $withHost      = true
    )
    {
        return $this->routeTranslator->generateUri(
            $resolverPath,
            $attributes,
            $withHost
        );
    }
1286252
public function getBaseUri()
    {
        if (empty($this->baseUriChecked)) {
            if (preg_match('#^https?://[^/]+$#', $this->baseUri)) {
                $this->baseUri .= '/';
            }
            $this->baseUriChecked = true;
        }

        return $this->baseUri;
    }