You are here

function _acquia_purge_are_we_on_acquiacloud in Acquia Purge 6

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

Determine whether we are running on Acquia Cloud or not.

@returns A boolean expression indicating if we currently run on Acquia cloud.

8 calls to _acquia_purge_are_we_on_acquiacloud()
drush_acquia_purge_ap_domains in ./acquia_purge.drush.inc
List all detected domain names that Acquia Purge will purge.
drush_acquia_purge_ap_forget in ./acquia_purge.drush.inc
Forget all scheduled purges and empty the queue.
drush_acquia_purge_ap_list in ./acquia_purge.drush.inc
List all the items that are in the queue.
drush_acquia_purge_ap_process in ./acquia_purge.drush.inc
Purge all queued items from the command line.
drush_acquia_purge_ap_purge in ./acquia_purge.drush.inc
Purge a specified path from your balancers.

... See full list

File

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

Code

function _acquia_purge_are_we_on_acquiacloud() {
  static $connected;

  // Build our assertions logic and cache it statically.
  if (is_null($connected)) {
    $assertions = array(
      is_array(variable_get('acquia_hosting_site_info', FALSE)),
      (bool) count(_acquia_purge_get_balancers()),
      (bool) _acquia_purge_get_site_name(),
      (bool) _acquia_purge_get_site_group(),
      function_exists('curl_init'),
    );
    $connected = !in_array(FALSE, $assertions);
  }
  return $connected;
}