function gconfig(string $value = NULL)
{
global $gconfig;
if (empty($gconfig)) {
$configs = array_merge(Folder::files(EXTERNAL_CONFIG_DIR, 'php'), Folder::files(CONFIG_DIR, 'php'), Folder::files(INTERNAL_CONFIG_DIR, 'php'));
$gconfig = [];
foreach ($configs as $file) {
$file = removeExtension($file);
$gconfig = array_merge($gconfig, (array) Config::get($file));
}
}
if ($value === NULL) {
return $gconfig;
}
return $gconfig[$value] ?? false;
}