protected function setConfig($config) { foreach ($config as $key => $value) { $this->config[$key] = is_array($value) ? new Config($value, $this->allowChanges) : $value; } }