/** * @param ConfigInterface $config */ private function configure(ConfigInterface $config) { if ($config->exists('imports')) { $resources = (array) $config->get('imports'); } else { $resources = []; } foreach ($resources as $resource) { $handler = isset($resource['mode']) ? $this->getOverwriteHandler($resource['mode']) : null; $path = StringSupport::parametrize($resource['resource'], $this->getDefaultVariables()); $current = $this->createConfig($path); $this->configure($current); $config->merge($current->getAll(), $handler); } }