You are here

function _s3fs_get_setting in S3 File System 7.3

Same name and namespace in other branches
  1. 7.2 s3fs.module \_s3fs_get_setting()

Internal function to retrieve the value of a specific setting, taking overrides in settings.php into account.

This function is most useful on the config form and for retrieving the AWS SDK settings. _s3fs_get_config() should be used in most other cases.

Parameters

string $setting: The short name of the setting. e.g. the "s3fs_use_cname" variable's short name is "use_cname".

5 calls to _s3fs_get_setting()
s3fs_requirements in ./s3fs.install
Implements hook_requirements().
s3fs_settings in ./s3fs.admin.inc
Builds the Settings form.
_s3fs_get_amazons3_client in ./s3fs.module
Sets up the S3Client object.
_s3fs_image_style_deliver in ./s3fs.module
Generates an image derivative in S3.
_s3fs_refresh_cache in ./s3fs.module
Refreshes the metadata cache.

File

./s3fs.module, line 852
Hook implementations and other primary functionality for S3 File System.

Code

function _s3fs_get_setting($setting, $default = '') {
  $config = _s3fs_get_config();

  // Get the value from _s3fs_get_config(), if it's set. This will include any overrides from settings.php, including
  // the awssdk_ prefixed vars.
  return !empty($config[$setting]) ? $config[$setting] : $default;
}