public function getConfig($key = null, $default = null)
{
if ($key === null) {
return $this->config;
}
// accept a/b/c as ['a']['b']['c']
if (strpos($key, '/')) {
return $this->getConfigByPath($key, $default);
}
if (!isset($this->config[$key])) {
return $default;
}
return $this->config[$key];
}