protected function DrupalOAuthClient::getAbsolutePath in OAuth 1.0 7.3
Same name and namespace in other branches
- 6.3 includes/DrupalOAuthClient.inc \DrupalOAuthClient::getAbsolutePath()
- 7.4 includes/DrupalOAuthClient.inc \DrupalOAuthClient::getAbsolutePath()
Makes sure a path is an absolute path
Prepends provider url if the path isn't absolute.
Parameters
string $path: The path to make absolute.
Return value
string The absolute path.
2 calls to DrupalOAuthClient::getAbsolutePath()
- DrupalOAuthClient::get in includes/
DrupalOAuthClient.inc - Make an OAuth request.
- DrupalOAuthClient::getAuthorizationUrl in includes/
DrupalOAuthClient.inc - Constructs the url that the user should be sent to to authorize the request token.
File
- includes/
DrupalOAuthClient.inc, line 363
Class
Code
protected function getAbsolutePath($path) {
$protocols = array(
'http',
'https',
);
$protocol = strpos($path, '://');
$protocol = $protocol ? substr($path, 0, $protocol) : '';
if (!in_array($protocol, $protocols)) {
$path = $this->consumer->configuration['provider_url'] . $path;
}
return $path;
}