public function config($key = null, $value = null)
{
if (!$this->initializedConfig) {
$this->initializeConfig();
}
if ($value == null) {
return $key == null ? $this->config : $this->config[$key];
} else {
$this->config[$key] = $value;
$this->saveConfig();
}
}