for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the LoopBackApiBundle package.
*
* (c) Théo FIDRY <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fidry\LoopBackApiBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* The extension of this bundle.
* @author Théo FIDRY <[email protected]>
class LoopBackApiExtension extends Extension
{
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
foreach ($config['parameters'] as $key => $value) {
$container->setParameter(sprintf('%s.parameter.%s', $this->getAlias(), $key), $value);
}
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
public function getAlias()
return 'loopback_api';