You are here

function drush_acquia_purge_ap_domains in Acquia Purge 7

Same name and namespace in other branches
  1. 6 acquia_purge.drush.inc \drush_acquia_purge_ap_domains()

List all detected domain names that Acquia Purge will purge.

File

./acquia_purge.drush.inc, line 184
Drush integration providing common maintenance tasks.

Code

function drush_acquia_purge_ap_domains() {
  $hostingInfo = _acquia_purge_service()
    ->hostingInfo();

  // Stop invocation if we are not detecting Acquia Cloud heuristics.
  if (!$hostingInfo
    ->isThisAcquiaCloud()) {
    return drush_set_error("You must be on Acquia Cloud to use Acquia Purge.");
  }
  foreach ($hostingInfo
    ->getDomains() as $domain) {
    printf("%s\n", $domain);
  }
}