function awssdk_config_load in AWS SDK for PHP 7.4
Same name and namespace in other branches
- 7.5 awssdk.module \awssdk_config_load()
- 7.3 awssdk.module \awssdk_config_load()
Load the default AWSSDK settings and apply variable overrides.
Return value
An associative array containing AWSSDK setting values.
2 calls to awssdk_config_load()
- AWSSDKUnitTest::testLibrary in ./
awssdk.test - Ensure that AWS SDK libraries integration and configuration work properly.
- config.inc in ./
config.inc - Provide AWSSDK config file that allows for Drupal variable overrides.
1 string reference to 'awssdk_config_load'
- awssdk_ui_settings_form_submit in ui/
awssdk_ui.module - Clear config cache to new settings take effect.
File
- ./
awssdk.module, line 85 - Provides primary Drupal hook implementations.
Code
function awssdk_config_load() {
if (!($config =& drupal_static(__FUNCTION__))) {
$config = ($cache = cache_get(__FUNCTION__)) ? $cache->data : array();
}
if (!$config) {
if ($defaults = awssdk_config_defaults()) {
foreach ($defaults as $key => $value) {
if ($override = variable_get($key)) {
$value = $override;
}
$config[$key] = $value;
}
}
cache_set(__FUNCTION__, $config);
}
return $config;
}