for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the AntiMattr MongoDB Migrations Bundle, a library by Matthew Fitzgerald.
*
* (c) 2014 Matthew Fitzgerald
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AntiMattr\Bundle\MongoDBMigrationsBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* @author Matthew Fitzgerald <[email protected]>
class MongoDBMigrationsExtension extends Extension
{
* Responds to the migrations configuration parameter.
* @param array $configs
* @param ContainerBuilder $container
public function load(array $configs, ContainerBuilder $container)
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
foreach ($config as $key => $value) {
$container->setParameter($this->getAlias() . '.' . $key, $value);
}
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.xml');
* {@inheritdoc}
public function getAlias()
return 'mongo_db_migrations';