for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Knowledge Base package.
*
* Copyright (c) 2015 LIN3S <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LIN3S\KnowledgeBaseBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* Class LIN3S Knowledge Base Extension.
* Loads configuration and exposes the parameters retrieved from the config as
* 'lin3s_knowledge_base.configuration_parameters'. This will be used by ConfigurationCompilerPass.
* @author Gorka Laucirica <[email protected]>
class LIN3SKnowledgeBaseExtension extends Extension
{
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$processor = new Processor();
$configuration = new Configuration();
$config = $processor->processConfiguration($configuration, $configs);
$loader = new YamlFileLoader(
$container,
new FileLocator(__DIR__ . '/../Resources/config')
);
$loader->load('services.yml');
$container->setParameter('lin3s_knowledge_base.configuration_parameters', $config);
}