- $configs = dba::select('config');
- foreach ($configs as $config) {
- $this->out("config[{$config['cat']}][{$config['k']}] = " . $config['v']);
+ Core\Config::load();
+
+ if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) {
+ $this->out('Warning: The JIT (Just In Time) Config adapter doesn\'t support loading the entire configuration, showing file config only');
+ }
+
+ $config = $a->getConfigCache()->getAll();
+ foreach ($config as $cat => $section) {
+ if (is_array($section)) {
+ foreach ($section as $key => $value) {
+ if (is_array($value)) {
+ foreach ($value as $k => $v) {
+ $this->out("{$cat}.{$key}[{$k}] => " . (is_array($v) ? implode(', ', $v) : $v));
+ }
+ } else {
+ $this->out("{$cat}.{$key} => " . $value);
+ }
+ }
+ } else {
+ $this->out("config.{$cat} => " . $section);
+ }