You are here

function _s3fs_get_config in S3 File System 7

Same name and namespace in other branches
  1. 7.3 s3fs.module \_s3fs_get_config()
  2. 7.2 s3fs.module \_s3fs_get_config()

Returns the current set of configuration settings as an associative array.

The functions in S3 File System which utilize variables always accept a config array instead of calling variable_get() themselves. This allows for their callers to override these configuration settings when necessary (like when attempting to validate new settings).

Return value

array

7 calls to _s3fs_get_config()
drush_s3fs_refresh_cache in ./s3fs.drush.inc
Refreshes the file metadata cache.
s3fs.test in tests/s3fs.test
S3fsStreamWrapper::__construct in ./S3fsStreamWrapper.inc
Stream wrapper constructor.
s3fs_settings in ./s3fs.admin.inc
Builds the Settings form.
s3fs_settings_validate in ./s3fs.admin.inc
Validates the values on the admin form.

... See full list

File

./s3fs.module, line 617
Sets up the S3fsStreamWrapper class to be used as a Drupal file system.

Code

function _s3fs_get_config() {

  // The global $conf array contains all the variables, including overrides
  // from settings.php.
  global $conf;
  $config = array();
  foreach ($conf as $key => $value) {
    if (substr($key, 0, 5) == 's3fs_') {
      $config[substr($key, 5)] = $value;
    }
  }
  return $config;
}