public function __set($name, $value) { if ($this->allowChanges) { $this->config[$name] = is_array($value) ? new Config($value, $this->allowChanges) : $value; } else { throw new \Exception('Real-time configuration changes are not allowed.'); } }