protected function setConfig(Config $config, ConfigSchema $schema = null)
    {
        if ($schema) {
            $schema->validate($config);
        }

        $config->validate();

        $this->config = $config;
    }