private function loadPucene(array $config, ContainerBuilder $container): void
    {
        $serviceIds = [];
        foreach ($config['indices'] as $name => $options) {
            $definition = new Definition(
                DbalStorage::class,
                [
                    $name,
                    new Reference($config['adapters']['pucene']['doctrine_dbal_connection']),
                    new Reference('pucene.pucene.compiler'),
                    new Reference('pucene.pucene.interpreter'),
                ]
            );

            $serviceIds[$name] = 'pucene.pucene.doctrine_dbal.' . $name;
            $container->setDefinition($serviceIds[$name], $definition);
        }

        $container->getDefinition('pucene.pucene.storage_factory')->replaceArgument(1, $serviceIds);

        $pass = new CollectorCompilerPass('pucene.pucene.visitor', 'pucene.pucene.visitor_pool', 'query');
        $pass->process($container);

        $pass = new CollectorCompilerPass('pucene.pucene.interpreter', 'pucene.pucene.interpreter_pool', 'element');
        $pass->process($container);
    }
private function loadPucene(array $config, ContainerBuilder $container): void
    {
        $serviceIds = [];
        foreach ($config['indices'] as $name => $options) {
            $definition = new Definition(
                DbalStorage::class,
                [
                    $name,
                    new Reference($config['adapters']['pucene']['doctrine_dbal_connection']),
                    new Reference('pucene.pucene.compiler'),
                    new Reference('pucene.pucene.interpreter'),
                ]
            );

            $serviceIds[$name] = 'pucene.pucene.doctrine_dbal.' . $name;
            $container->setDefinition($serviceIds[$name], $definition);
        }

        $container->getDefinition('pucene.pucene.storage_factory')->replaceArgument(1, $serviceIds);

        $pass = new CollectorCompilerPass('pucene.pucene.visitor', 'pucene.pucene.visitor_pool', 'query');
        $pass->process($container);

        $pass = new CollectorCompilerPass('pucene.pucene.interpreter', 'pucene.pucene.interpreter_pool', 'element');
        $pass->process($container);
    }
private function loadPucene ( array $ config , ContainerBuilder $ container ) : void { $ serviceIds = [ ] ; foreach ( $ config [ 'indices' ] as $ name => $ options ) { $ definition = new Definition ( DbalStorage :: class , [ $ name , new Reference ( $ config [ 'adapters' ] [ 'pucene' ] [ 'doctrine_dbal_connection' ] ) , new Reference ( 'pucene.pucene.compiler' ) , new Reference ( 'pucene.pucene.interpreter' ) , ] ) ; $ serviceIds [ $ name ] = 'pucene.pucene.doctrine_dbal.' . $ name ; $ container -> setDefinition ( $ serviceIds [ $ name ] , $ definition ) ; } $ container -> getDefinition ( 'pucene.pucene.storage_factory' ) -> replaceArgument ( 1 , $ serviceIds ) ; $ pass = new CollectorCompilerPass ( 'pucene.pucene.visitor' , 'pucene.pucene.visitor_pool' , 'query' ) ; $ pass -> process ( $ container ) ; $ pass = new CollectorCompilerPass ( 'pucene.pucene.interpreter' , 'pucene.pucene.interpreter_pool' , 'element' ) ; $ pass -> process ( $ container ) ; }
Load specific configuration for pucene.
Load specific configuration for pucene .