$configs = DBA::select('config', ['cat', 'v', 'k']);
while ($config = DBA::fetch($configs)) {
- $return[$config['k']] = $config['v'];
+ $return[$config['cat']][$config['k']] = $config['v'];
}
DBA::close($configs);
$this->config_loaded = true;
- return [$cat => $return];
+ return $return;
}
/**
public function get($cat, $key)
{
if (!$this->isConnected()) {
- return null;
+ return '!<unset>!';
}
$config = DBA::selectFirst('config', ['v'], ['cat' => $cat, 'k' => $key]);
return $result;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isLoaded($cat, $key)
+ {
+ if (!$this->isConnected()) {
+ return false;
+ }
+
+ return $this->config_loaded;
+ }
}