Returns the current URL, stripping if of known OAuth parameters that should not persist.
@return string Current URL.
170884
protected function getCurrentUrl()
    {
        $filters = array(
            'HTTPS'                  => FILTER_VALIDATE_BOOLEAN,
            'HTTP_SSL_HTTPS'         => FILTER_VALIDATE_BOOLEAN,
            'HTTP_X_FORWARDED_PROTO' => FILTER_SANITIZE_STRING,
            'HTTP_HOST'              => FILTER_SANITIZE_STRING,
            'REQUEST_URI'            => FILTER_SANITIZE_STRING,
        );
        // FastCGI seems to cause strange side-effects with unexpected NULL values when using INPUT_SERVER and
        // INPUT_ENV with the filter_input() and filter_input_array() functions, so we're using a workaround there.
        // See: http://fr2.php.net/manual/en/function.filter-input.php#77307
        if (PHP_SAPI === 'cgi-fcgi')
        {
            $values = $filters;
            array_walk($values, function (&$value, $key) { $value = isset($_SERVER[$key]) ? $_SERVER[$key] : null; });
            $values = filter_var_array($values, $filters);
        }
        else
        {
            $values = filter_input_array(INPUT_SERVER, $filters);
        }
        $secure = ($values['HTTPS'] || $values['HTTP_SSL_HTTPS'] || (strtolower($values['HTTP_X_FORWARDED_PROTO']) === 'https'));
        $scheme = $secure ? 'https://' : 'http://';

        $currentUrl = $scheme . $values['HTTP_HOST'] . $values['REQUEST_URI'];
        $parts      = parse_url($currentUrl);

        // Remove OAuth callback params
        $query = null;
        if (!empty($parts['query']))
        {
            $parameters = array();
            parse_str($parts['query'], $parameters);

            foreach(self::$DROP_QUERY_PARAMS as $name)
            {
                unset($parameters[$name]);
            }
            if (count($parameters) > 0)
            {
                $query = '?' . http_build_query($parameters, null, '&');
            }
        }
        // Use port if non default
        $port = (!empty($parts['port']) && (($secure) ? ($parts['port'] !== 80) : ($parts['port'] !== 443)))
            ? ":{$parts['port']}"
            : null;

        // Rebuild
        return $scheme . $parts['host'] . $port . $parts['path'] . $query;
    }
393035
protected function getCurrentUri()
    {
        $uri = isset($_SERVER['REQUEST_URI'])
            ? $_SERVER['REQUEST_URI']
            : false;
        if (!$uri) {
            $uri = $_SERVER['SCRIPT_NAME'];
            if (isset($_SERVER['argv']) || isset($_SERVER['QUERY_STRING'])) {
                $uri .= '?';
                $uri .= isset($_SERVER['argv'])
                    ? $_SERVER['argv'][0]
                    : $_SERVER['QUERY_STRING'];
            }
        }
        return 'http'
            . (isset($_SERVER['HTTPS']) ? 's' : '')
            . '://'
            . $_SERVER['HTTP_HOST']
            . '/'
            . ltrim($uri, '/');
    }
774829
public static function getCurrentUrl()
    {
        return self::getCurrentScheme() . '://'
        . self::getCurrentHost()
        . self::getCurrentScriptName(false)
        . self::getCurrentQueryString();
    }
581768
public function getAuthUrl()
    {
        $return = $this->baseUrl .
          '/' . $this->authNamespace .
          '/' . $this->authVersion .
          '/token?url=' . $this->baseUrl . '/' . $this->apiNamespace;

        return $return;
    }
941682
private function getUrl()
    {
        if ($this->mode === static::MODE_PROD) {
            $url = static::URL_PROD;
        } elseif ($this->mode === static::MODE_CONSIGNMENT) {
            $url = static::URL_CONSIGNMENT;
        } else {
            $url = static::URL_TEST;
        }

        return 'http' . ($this->secured ? 's' : '') . '://' . $url;
    }
1215399
public function getAuthoriseUrl()
    {
        // Get the request token
        $token = $this->getToken();
    
        // Prepare request parameters
        $params = array(
            'oauth_token' => $token->oauth_token,
            'oauth_token_secret' => $token->oauth_token_secret,
            'oauth_callback' => $this->callback,
        );
    
        // Build the URL and redirect the user
        $query = '?' . http_build_query($params, '', '&');
        $url = self::WEB_URL . self::AUTHORISE_METHOD . $query;
        return $url;
    }
601448
public function getCurrentUri() : string
    {
        $basePath = $this->getBaseUrl();
        $uri = $this->currentUrl;

        $this->base = $basePath;
        $uri = substr($uri, strlen($basePath));

        // Don't take query params into account on the URL
        if (strstr($uri, '?')) {
            $uri = substr($uri, 0, strpos($uri, '?'));
        }

        // Remove trailing slash + enforce a slash at the start
        $uri = '/'.trim($uri, '/');

        return $uri;
    }
455800
public function getUrl()
    {
        if (empty($this->url)) {
            $url = $this->httpRequest()->getCurrentUrl(true)->getPath();
            // we need to have the trailing slash because of the match inside matchRequest
            // and also when matching the default method, we can do an incorrect match if we don't have the start and end slash
            $this->url = $this->str($url)->trimRight('/')->val() . '/';
        }

        return $this->url;
    }
1291462
public function getCurrentUrlFolder() {
        $url = self::getCurrentUrl();
        $pieces = explode('/', $url);
        array_pop($pieces);
        $retval = implode('/', $pieces);
        return $retval;
    }
939358
public function getAuthUrl()
    {
        if (! $oauthConfig = $this->client->getConfig("oauth2")) {
            throw new \Exception('OAuth2 authorisation not registered');
        }

        $command = $this->client->getCommand('GetAuthUrl', (array) $oauthConfig)->prepare();
        return $command->getUrl();
    }
1260265
protected function getOauth()
    {
        if (null == $this->oauth) {
            $this->oauth = $this->createOauth();
        }

        return $this->oauth;
    }
211315
private function getCurrentUrlPath()
    {
        if ($this->path) {
            return $this->path;
        }

        /**
         * check if the path is empty otherwise
         * set it with the server variable and if there's no server variable set it as the default delimiter [/] the root
         */
        $this->path = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
        $this->urlPart = $this->parsePath($this->path);

        return $this->path;
    }
438337
public static function currentPage() {
		$uri = static::to(static::detectPath());
		foreach ($_GET as $k => $v) {
			$uri->param($k, $v);
		}

		return $uri;
	}
193153
public function getURL()
    {
        $p = $this->recall('page');

        // If there is a login page, no need to return to it
        if ($p == 'login') {
            return $this->app->url('/');
        }

        $url = $this->app->url($p, $this->recall('args', null));
        $this->forget('page');
        $this->forget('args');

        return $url;
    }
153327
public static function getCurrentUrl() 
    {
        $pageURL = 'http';
        
        if (isset($_SERVER["HTTPS"])) 
        {
            $pageURL .= "s";
        }
        
        $pageURL .= "://";

        if ($_SERVER["SERVER_PORT"] != "80") 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . 
                        $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } 
        else 
        {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }

        return $pageURL;
    }
1366027
public function getBaseAuthorizationUrl()
    {
        $base = new Uri($this->authUrl);
        $path = new Uri('/authorization');
        return (string) UriResolver::resolve($base, $path);
        ;
    }
248555
protected function GetRequestURL()
    {
        $sAccountId = $this->GetConfigParameter('account_id');
        $sRequestUrl = $this->GetConfigParameter('request_url');
        $sRequestUrl = str_replace('[{sAccountId}]', $sAccountId, $sRequestUrl);

        return $sRequestUrl;
    }