for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the PostmanGeneratorBundle package.
*
* (c) Vincent Chalamon <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PostmanGeneratorBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader;
class PostmanGeneratorExtension extends Extension
{
/**
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('postman.name', $config['name']);
$container->setParameter('postman.baseUrl', $config['baseUrl']);
$container->setParameter('postman.description', $config['description']);
$container->setParameter('postman.authentication', $config['authentication']);
$container->setParameter('postman.public', $config['public']);
$container->setParameter('postman.defaultLocale', $config['defaultLocale']);
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
}