private function loadFromPlugins(bool $development, string $cacheFile = null): array
    {
        $resolver = $this->resolverFactory->create();

        /** @var BundlePluginInterface[] $plugins */
        $plugins = $this->pluginLoader->getInstancesOf(PluginLoader::BUNDLE_PLUGINS);

        foreach ($plugins as $plugin) {
            foreach ($plugin->getBundles($this->parser) as $config) {
                $resolver->add($config);
            }
        }

        $bundleConfigs = $resolver->getBundleConfigs($development);

        if (null !== $cacheFile) {
            $this->filesystem->dumpFile($cacheFile, sprintf('<?php return %s;', var_export($bundleConfigs, true)));
        }

        return $bundleConfigs;
    }
private function loadFromPlugins(bool $development, string $cacheFile = null): array
    {
        $resolver = $this->resolverFactory->create();

        /** @var BundlePluginInterface[] $plugins */
        $plugins = $this->pluginLoader->getInstancesOf(PluginLoader::BUNDLE_PLUGINS);

        foreach ($plugins as $plugin) {
            foreach ($plugin->getBundles($this->parser) as $config) {
                $resolver->add($config);
            }
        }

        $bundleConfigs = $resolver->getBundleConfigs($development);

        if (null !== $cacheFile) {
            $this->filesystem->dumpFile($cacheFile, sprintf('<?php return %s;', var_export($bundleConfigs, true)));
        }

        return $bundleConfigs;
    }
private function loadFromPlugins ( bool $ development , string $ cacheFile = null ) : array { $ resolver = $ this -> resolverFactory -> create ( ) ; /** @var BundlePluginInterface[] $plugins */ $ plugins = $ this -> pluginLoader -> getInstancesOf ( PluginLoader :: BUNDLE_PLUGINS ) ; foreach ( $ plugins as $ plugin ) { foreach ( $ plugin -> getBundles ( $ this -> parser ) as $ config ) { $ resolver -> add ( $ config ) ; } } $ bundleConfigs = $ resolver -> getBundleConfigs ( $ development ) ; if ( null !== $ cacheFile ) { $ this -> filesystem -> dumpFile ( $ cacheFile , sprintf ( '<?php return %s;' , var_export ( $ bundleConfigs , true ) ) ) ; } return $ bundleConfigs ; }
Generates the bundles map.

@return ConfigInterface[]
Generates the bundles map .