aboutsummaryrefslogblamecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
blob: 330cc957698660ad95eab41e095419fedca206da (plain) (tree)
1
2
3
4
5
6
7
8
9

     
                                                  

                                                           
                                         

                                                               
 
                                             


                                                                     



                                                                                  
                                                                                                         
                                      



                              
                               

     
<?php

namespace Wallabag\CoreBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;

class WallabagCoreExtension extends Extension
{
    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);
        $container->setParameter('wallabag_core.languages', $config['languages']);

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');
    }

    public function getAlias()
    {
        return 'wallabag_core';
    }
}