You are here

protected function LingotekOAuthRequest::defaultPortForScheme in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::defaultPortForScheme()
  2. 7.4 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::defaultPortForScheme()
  3. 7.5 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::defaultPortForScheme()

* Return the default port for a scheme * *

Parameters

string scheme: * @return int

2 calls to LingotekOAuthRequest::defaultPortForScheme()
LingotekOAuthRequest::getRequestUrl in lib/oauth-php/library/LingotekOAuthRequest.php
* Return the normalised url for signature checks
LingotekOAuthRequest::parseUri in lib/oauth-php/library/LingotekOAuthRequest.php
* Parse the uri into its parts. Fill in the missing parts. * *

File

lib/oauth-php/library/LingotekOAuthRequest.php, line 592

Class

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

Code

protected function defaultPortForScheme($scheme) {
  switch ($scheme) {
    case 'http':
      return 80;
    case 'https':
      return 443;
    default:
      throw new OAuthException2('Unsupported scheme type, expected http or https, got "' . $scheme . '"');
      break;
  }
}