Return s3fs configuration settings and values.

Paramètres

string $key: A specific key available in the s3fs configuration. NULL by default.

Return value

array|string|null The full s3fs configuration settings, value of a specific key, or NULL if s3fs is not enabled and the function do not exist, or the s3fs value is not defined.

Sujets associés

4 calls to advagg_get_s3fs_config()
advagg_install_check_via_http dans ./advagg.install
Make sure http requests to css/js files work correctly.
advagg_relocate_css_post_alter dans advagg_relocate/advagg_relocate.module
Alter the css array.
advagg_relocate_js_post_alter dans advagg_relocate/advagg_relocate.module
Alter the js array.
advagg_s3fs_evaluate_no_rewrite_cssjs dans ./advagg.module
Shortcut to evaluate if s3fs no_rewrite_cssjs is set or empty.

Fichier

./advagg.module, line 1389

Code

function advagg_get_s3fs_config($key = NULL) {
    if (module_exists('s3fs') && is_callable('_s3fs_get_config')) {
        $s3fs_config = _s3fs_get_config();
        if (empty($key)) {
            return $s3fs_config;
        }
        elseif (isset($s3fs_config[$key])) {
            return $s3fs_config[$key];
        }
    }
    return NULL;
}