function gardens_site_data_load_file in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 acsf_init/lib/sites/g/sites.inc \gardens_site_data_load_file()
Returns the sites data structure.
Return value
bool|mixed An array of sites data on success, or FALSE on failure to load or parse the file.
5 calls to gardens_site_data_load_file()
- 000-acquia_required_scrub.php in acsf_init/
lib/ cloud_hooks/ common/ post-db-copy/ 000-acquia_required_scrub.php - Scrubs a site after its database has been copied.
- gardens_site_data_get_site_from_file in acsf_init/
lib/ sites/ g/ sites.inc - Parses the entire JSON sites file and returns a result for a single domain.
- gardens_site_data_refresh_all in acsf_init/
lib/ sites/ g/ sites.inc - Fully refreshes the APC cached site/domain data, rewriting every key.
- gardens_site_data_refresh_domains in acsf_init/
lib/ sites/ g/ sites.inc - Returns data for the specified domains directly from the JSON file.
- gardens_site_data_sites_json_issue_type_get in acsf_init/
lib/ sites/ g/ sites.inc - Re-checks for a fatal issue with the sites.json file.
1 string reference to 'gardens_site_data_load_file'
File
- acsf_init/
lib/ sites/ g/ sites.inc, line 88 - ACSF helper functions for Drupal's multi-site directory aliasing feature.
Code
function gardens_site_data_load_file() {
if (GARDENS_SITE_JSON_LEGACY) {
// Retrieve sites.json data from a gluster file.
$json = @file_get_contents(gardens_site_data_get_filepath());
return $json ? json_decode($json, TRUE) : FALSE;
}
else {
// Retrieve sites data using the interface provided by the Acquia Cloud
// layer.
$config = Config::getInstance();
return empty($config) ? FALSE : $config
->all();
}
}