public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->factoryId)) {
            return;
        }

        $searchEngineFactoryDefinition = $container->getDefinition($this->factoryId);

        foreach ($container->findTaggedServiceIds('ezpublish.searchEngine') as $id => $attributes) {
            foreach ($attributes as $attribute) {
                if (!isset($attribute['alias'])) {
                    throw new LogicException(
                        'ezpublish.searchEngine service tag needs an "alias" attribute to ' .
                        'identify the search engine. None given.'
                    );
                }

                // Register the search engine with the search engine factory
                $searchEngineFactoryDefinition->addMethodCall(
                    'registerSearchEngine',
                    array(
                        new Reference($id),
                        $attribute['alias'],
                    )
                );
            }
        }
    }
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->factoryId)) {
            return;
        }

        $searchEngineFactoryDefinition = $container->getDefinition($this->factoryId);

        foreach ($container->findTaggedServiceIds('ezpublish.searchEngine') as $id => $attributes) {
            foreach ($attributes as $attribute) {
                if (!isset($attribute['alias'])) {
                    throw new LogicException(
                        'ezpublish.searchEngine service tag needs an "alias" attribute to ' .
                        'identify the search engine. None given.'
                    );
                }

                // Register the search engine with the search engine factory
                $searchEngineFactoryDefinition->addMethodCall(
                    'registerSearchEngine',
                    array(
                        new Reference($id),
                        $attribute['alias'],
                    )
                );
            }
        }
    }
public function process ( ContainerBuilder $ container ) { if ( ! $ container -> hasDefinition ( $ this -> factoryId ) ) { return ; } $ searchEngineFactoryDefinition = $ container -> getDefinition ( $ this -> factoryId ) ; foreach ( $ container -> findTaggedServiceIds ( 'ezpublish.searchEngine' ) as $ id => $ attributes ) { foreach ( $ attributes as $ attribute ) { if ( ! isset ( $ attribute [ 'alias' ] ) ) { throw new LogicException ( 'ezpublish.searchEngine service tag needs an "alias" attribute to ' . 'identify the search engine. None given.' ) ; } // Register the search engine with the search engine factory $ searchEngineFactoryDefinition -> addMethodCall ( 'registerSearchEngine' , array ( new Reference ( $ id ) , $ attribute [ 'alias' ] , ) ) ; } } }
Registers all found search engines to the SearchEngineFactory.

@throws \LogicException

@param \Symfony\Component\DependencyInjection\ContainerBuilder $container
Registers all found search engines to the SearchEngineFactory .