for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Ivory Lucene Search package.
*
* (c) Eric GELOEN <[email protected]>
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/
namespace Ivory\LuceneSearchBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* @author GeLo <[email protected]>
class IvoryLuceneSearchExtension extends Extension
{
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$config = $this->processConfiguration(new Configuration(), $configs);
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
foreach (['services'] as $resource) {
$loader->load($resource.'.xml');
}
if (!empty($config)) {
$container
->getDefinition('ivory_lucene_search')
->addMethodCall('setIndexes', [$config]);