public function OAuthRequest::get_normalized_http_url in jQuery social stream 8
Same name and namespace in other branches
- 8.2 src/Twitter/OAuthRequest.php \Drupal\jquery_social_stream\Twitter\OAuthRequest::get_normalized_http_url()
parses the url and rebuilds it to be scheme://host/path
2 calls to OAuthRequest::get_normalized_http_url()
- OAuthRequest::get_signature_base_string in src/
Twitter/ OAuthRequest.php - Returns the base string of this request
- OAuthRequest::to_url in src/
Twitter/ OAuthRequest.php - builds a url usable for a GET request
File
- src/
Twitter/ OAuthRequest.php, line 169
Class
Namespace
Drupal\jquery_social_stream\TwitterCode
public function get_normalized_http_url() {
$parts = parse_url($this->http_url);
$port = @$parts['port'];
$scheme = $parts['scheme'];
$host = $parts['host'];
$path = @$parts['path'];
$port or $port = $scheme == 'https' ? '443' : '80';
if ($scheme == 'https' && $port != '443' || $scheme == 'http' && $port != '80') {
$host = "{$host}:{$port}";
}
return "{$scheme}://{$host}{$path}";
}