for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
//----------------------------------------------------------------------
//
// Copyright (C) 2017 Artem Rodygin
// You should have received a copy of the MIT License along with
// this file. If not, see <http://opensource.org/licenses/MIT>.
namespace Pignus\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
/**
* Loads and manages the bundle configuration.
*
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class PignusExtension extends ConfigurableExtension
{
* {@inheritdoc}
protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
if ($mergedConfig['unauthorized_request']) {
$loader->load('unauthorized_request.yml');
}
$container->setParameter('pignus.login', $mergedConfig['login'] ?? []);