src/Core/Config/CoreConfigFactory.php
public function createRoot()
    {
        $instance = new CachedConfigCollection();

        // Override nested config to use delta collection
        $instance->setNestFactory(function ($collection) {
            return DeltaConfigCollection::createFromCollection($collection, Config::NO_DELTAS);
        });

        // Create config cache
        if ($this->cacheFactory) {
            $cache = $this->cacheFactory->create(CacheInterface::class . '.configcache', [
                'namespace' => 'configcache'
            ]);
            $instance->setCache($cache);
        }

        // Set collection creator
        $instance->setCollectionCreator(function () {
            return $this->createCore();
        });

        return $instance;
    }
public function createRoot()
    {
        $instance = new CachedConfigCollection();

        // Override nested config to use delta collection
        $instance->setNestFactory(function ($collection) {
            return DeltaConfigCollection::createFromCollection($collection, Config::NO_DELTAS);
        });

        // Create config cache
        if ($this->cacheFactory) {
            $cache = $this->cacheFactory->create(CacheInterface::class . '.configcache', [
                'namespace' => 'configcache'
            ]);
            $instance->setCache($cache);
        }

        // Set collection creator
        $instance->setCollectionCreator(function () {
            return $this->createCore();
        });

        return $instance;
    }
public function createRoot ( ) { $ instance = new CachedConfigCollection ( ) ; // Override nested config to use delta collection $ instance -> setNestFactory ( function ( $ collection ) { return DeltaConfigCollection :: createFromCollection ( $ collection , Config :: NO_DELTAS ) ; } ) ; // Create config cache if ( $ this -> cacheFactory ) { $ cache = $ this -> cacheFactory -> create ( CacheInterface :: class . '.configcache' , [ 'namespace' => 'configcache' ] ) ; $ instance -> setCache ( $ cache ) ; } // Set collection creator $ instance -> setCollectionCreator ( function ( ) { return $ this -> createCore ( ) ; } ) ; return $ instance ; }
Create root application config.
This will be an immutable cached config,
which conditionally generates a nested "core" config.

@return CachedConfigCollection
Create root application config . This will be an immutable cached config which conditionally generates a nested core config .