You are here

protected function AcquiaPurgeHostingInfo::domainsAddFromDrupal in Acquia Purge 7

Extract domain names from HTTP_HOST and Drupal's url() function.

1 call to AcquiaPurgeHostingInfo::domainsAddFromDrupal()
AcquiaPurgeHostingInfo::domains in lib/AcquiaPurgeHostingInfo.php
Initialize $this->domains.

File

lib/AcquiaPurgeHostingInfo.php, line 229
Contains AcquiaPurgeHostingInfo.

Class

AcquiaPurgeHostingInfo
Provides technical information accessors for the Acquia Cloud environment.

Code

protected function domainsAddFromDrupal() {
  $this->domains[] = $_SERVER['HTTP_HOST'];
  if ($parsed_url = parse_url(url('', array(
    'absolute' => TRUE,
  )))) {
    $this->domains[] = $parsed_url['host'];
  }
}