private function createCacheFactories()
    {
        if (null !== $this->cacheFactories) {
            return $this->cacheFactories;
        }

        // load bundled cache factories
        $tempContainer = new ContainerBuilder();
        $loader = new Loader\XmlFileLoader($tempContainer, new FileLocator(__DIR__.'/../Resources/config'));

        $loader->load('cache_factories.xml');

        $cacheFactories = array();
        foreach ($tempContainer->findTaggedServiceIds('tbbc_cache.cache_factory') as $id => $factories) {
            foreach ($factories as $factory) {
                if (!isset($factory['cache_type'])) {
                    throw new \InvalidArgumentException(sprintf(
                        'Service "%s" must define a "cache_type" attribute for "tbbc_cache.cache_factory" tag',
                        $id
                    ));
                }

                $factoryService = $tempContainer->get($id);
                $cacheFactories[str_replace('-', '_', strtolower($factory['cache_type']))] = $factoryService;
            }
        }

        return $this->cacheFactories = $cacheFactories;
    }
private function createCacheFactories()
    {
        if (null !== $this->cacheFactories) {
            return $this->cacheFactories;
        }

        // load bundled cache factories
        $tempContainer = new ContainerBuilder();
        $loader = new Loader\XmlFileLoader($tempContainer, new FileLocator(__DIR__.'/../Resources/config'));

        $loader->load('cache_factories.xml');

        $cacheFactories = array();
        foreach ($tempContainer->findTaggedServiceIds('tbbc_cache.cache_factory') as $id => $factories) {
            foreach ($factories as $factory) {
                if (!isset($factory['cache_type'])) {
                    throw new \InvalidArgumentException(sprintf(
                        'Service "%s" must define a "cache_type" attribute for "tbbc_cache.cache_factory" tag',
                        $id
                    ));
                }

                $factoryService = $tempContainer->get($id);
                $cacheFactories[str_replace('-', '_', strtolower($factory['cache_type']))] = $factoryService;
            }
        }

        return $this->cacheFactories = $cacheFactories;
    }
private function createCacheFactories ( ) { if ( null !== $ this -> cacheFactories ) { return $ this -> cacheFactories ; } // load bundled cache factories $ tempContainer = new ContainerBuilder ( ) ; $ loader = new Loader \ XmlFileLoader ( $ tempContainer , new FileLocator ( __DIR__ . '/../Resources/config' ) ) ; $ loader -> load ( 'cache_factories.xml' ) ; $ cacheFactories = array ( ) ; foreach ( $ tempContainer -> findTaggedServiceIds ( 'tbbc_cache.cache_factory' ) as $ id => $ factories ) { foreach ( $ factories as $ factory ) { if ( ! isset ( $ factory [ 'cache_type' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Service "%s" must define a "cache_type" attribute for "tbbc_cache.cache_factory" tag' , $ id ) ) ; } $ factoryService = $ tempContainer -> get ( $ id ) ; $ cacheFactories [ str_replace ( '-' , '_' , strtolower ( $ factory [ 'cache_type' ] ) ) ] = $ factoryService ; } } return $ this -> cacheFactories = $ cacheFactories ; }
Creates the cache factories

@return array|CacheFactoryInterface[]
Creates the cache factories