for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of HeriJobQueueBundle.
*
* (c) Alexandre Mogère
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Heri\Bundle\JobQueueBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
* This is the class that loads and manages your bundle configuration.
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
class HeriJobQueueExtension extends Extension
{
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('parameters.xml');
$loader->load('services.xml');
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
if (isset($config)) {
$container->setParameter('jobqueue.config', $config);
$container->setParameter('jobqueue.adapter.type', $config['adapter']);
}