function akamai_get_hostname in Akamai 7.3
Gets the hostname for which purge requests will be issued.
Parameters
object $language: (optional) The language object. If the option to use the language domain is enabled, $language->domain will be used.
Return value
string Akamai hostname.
3 calls to akamai_get_hostname()
- akamai_clear_url in ./
akamai.module - Deprecated. Use akamai_purge_path() instead.
- akamai_purge_path in ./
akamai.module - Purges a path and its related paths from Akamai's cache.
- akamai_purge_paths in ./
akamai.module - Purges a set of paths from Akamai's cache.
File
- ./
akamai.module, line 391 - Integration with Akamai CDN CCU API.
Code
function akamai_get_hostname($language = NULL) {
$language = empty($language) ? $GLOBALS['language_url'] : $language;
if (variable_get('akamai_use_language_domain', FALSE) && !empty($language->domain)) {
$hostname = $language->domain;
}
else {
$hostname = variable_get('akamai_hostname', '');
}
$context = [
'language' => $language,
];
drupal_alter('akamai_hostname', $hostname, $context);
return $hostname;
}