public function getConfig(Schema $schema = null)
    {
        if (!$schema) {
            $schema = new Schema();
        }

        $config = new Config();

        foreach ($this->resources as $resource) {
            $values = $this->loadResource($resource[0], $resource[2]);
            if (is_string($prefix = $resource[1])) {
                $values = [
                    $prefix => $values,
                ];
            }

            $config->merge($values);
        }

        foreach ($this->processors as $processor) {
            $processor->onPostMerge($config, $schema);
        }

        return $config;
    }