eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterSearchEnginePass::process PHP Метод

process() публичный Метод

Registers all found search engines to the SearchEngineFactory.
public process ( ContainerBuilder $container )
$container Symfony\Component\DependencyInjection\ContainerBuilder
    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']));
            }
        }
    }
RegisterSearchEnginePass