You are here

function OAuthRequest::getRequestUrl in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.3 lib/oauth-php/library/OAuthRequest.php \OAuthRequest::getRequestUrl()

* Return the normalised url for signature checks

3 calls to OAuthRequest::getRequestUrl()
OAuthRequest::signatureBaseString in lib/oauth-php/library/OAuthRequest.php
* Return the signature base string. * Note that we can't use rawurlencode due to specified use of RFC3986. * *
OAuthRequester::curl_raw in lib/oauth-php/library/OAuthRequester.php
* Open and close a curl session passing all the options to the curl libs * *
OAuthRequestSigner::sign in lib/oauth-php/library/OAuthRequestSigner.php
* Sign our message in the way the server understands. * Set the needed oauth_xxxx parameters. * *

File

lib/oauth-php/library/OAuthRequest.php, line 372

Class

OAuthRequest
Object to parse an incoming OAuth request or prepare an outgoing OAuth request

Code

function getRequestUrl() {
  $url = $this->uri_parts['scheme'] . '://' . $this->uri_parts['user'] . (!empty($this->uri_parts['pass']) ? ':' : '') . $this->uri_parts['pass'] . (!empty($this->uri_parts['user']) ? '@' : '') . $this->uri_parts['host'];
  if ($this->uri_parts['port'] && $this->uri_parts['port'] != $this
    ->defaultPortForScheme($this->uri_parts['scheme'])) {
    $url .= ':' . $this->uri_parts['port'];
  }
  if (!empty($this->uri_parts['path'])) {
    $url .= $this->uri_parts['path'];
  }
  return $url;
}