You are here

function gardens_site_data_refresh_one in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 acsf_init/lib/sites/g/sites.inc \gardens_site_data_refresh_one()

Returns data for a single domain.

Optionally also stores the data in APC.

Parameters

string $domain: The domain name to look up.

Return value

array|int|null An array of site data, 0 if no site was found for the given domain, or NULL if a sites.json read failure was encountered.

1 call to gardens_site_data_refresh_one()
gardens_site_data_get_site_from_server_info in acsf_init/lib/sites/g/sites.inc
Checks for a registered ACSF site based on Apache server variables.

File

acsf_init/lib/sites/g/sites.inc, line 351
ACSF helper functions for Drupal's multi-site directory aliasing feature.

Code

function gardens_site_data_refresh_one($domain) {
  if (GARDENS_SITE_JSON_LEGACY) {

    // Using the legacy sites.json file from the gluster, and optionally also
    // stores the data in APC.
    $data = gardens_site_data_refresh_domains([
      $domain,
    ]);
  }
  else {

    // Using interface provided by the Acquia Cloud layer, no APC cache handling
    // in this case.
    $data = gardens_site_data_from_multi_site_config([
      $domain,
    ]);
  }
  return isset($data[$domain]) ? $data[$domain] : NULL;
}