You are here

protected function AcquiaPurgeHostingInfo::domains in Acquia Purge 7

Initialize $this->domains.

1 call to AcquiaPurgeHostingInfo::domains()
AcquiaPurgeHostingInfo::__construct in lib/AcquiaPurgeHostingInfo.php
Constructs a AcquiaPurgeHostingInfo object.

File

lib/AcquiaPurgeHostingInfo.php, line 152
Contains AcquiaPurgeHostingInfo.

Class

AcquiaPurgeHostingInfo
Provides technical information accessors for the Acquia Cloud environment.

Code

protected function domains() {

  // Avoid automatic detection when 'acquia_purge_domains' contains hardcodes.
  if ($this
    ->areDomainsHardcoded()) {
    foreach (_acquia_purge_variable('acquia_purge_domains') as $hardcode) {
      $this->domains[] = $hardcode;
    }
  }
  else {
    $this
      ->domainsAddFromDrupal();
    $this
      ->domainsAddFromSitesPhp();

    // Source domains from the Acquia Cloud platform. However, only source
    // them for the 'default' site so that multisite configs don't blow up.
    if ($this
      ->isThisAcquiaCloud() && conf_path() == 'sites/default') {
      $this
        ->domainsAddFromAcquiaCloud();
    }
  }

  // Allow alteration of the domains list and assure that our list is clean.
  $this
    ->domainsAlter();
  $this
    ->domainsNormalize();
}