You are here

function _acquia_purge_get_domains_add in Acquia Purge 6

Same name and namespace in other branches
  1. 7 acquia_purge.deprecated.inc \_acquia_purge_get_domains_add()

Add a domain to the domain list after cleaning and checking for duplicates.

@returns Void, data will be added by reference.

Parameters

string $domain: The domain string to be added to the list.

array &$domains: A reference to the array of currently gathered domain names.

2 calls to _acquia_purge_get_domains_add()
_acquia_purge_get_domains in ./acquia_purge.module
Get a list of defined domains that we can purge for.
_acquia_purge_get_domains_add_acloud in ./acquia_purge.module
Expand the list of domains being gathered by those defined in Acquia Cloud.

File

./acquia_purge.module, line 504
Acquia Purge, Top-notch Varnish purging on Acquia Cloud!

Code

function _acquia_purge_get_domains_add($domain, &$domains) {
  $domain = trim(drupal_strtolower($domain));
  if (!empty($domain) && !in_array($domain, $domains)) {
    $domains[] = $domain;
  }
}