public function getConfig(?string $key = null, ?string $subKey = null)
    {
        if ($key === null) {
            return $this->config;
        }
        $key = (string) $key;
        $subKey = $subKey === null ? null : (string) $subKey;
        if (array_key_exists($key, $this->config)) {
            if ($subKey !== null) {
                return array_key_exists($subKey, $this->config[$key]) 
                    ? $this->config[$key][$subKey] 
                    : null;
            }
            return $this->config[$key];
        }
        return null;
    }