3 namespace Wallabag\CoreBundle\DependencyInjection
;
5 use Symfony\Component\Config\FileLocator
;
6 use Symfony\Component\DependencyInjection\ContainerBuilder
;
7 use Symfony\Component\DependencyInjection\Loader
;
8 use Symfony\Component\HttpKernel\DependencyInjection\Extension
;
10 class WallabagCoreExtension
extends Extension
12 public function load(array $configs, ContainerBuilder
$container)
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
17 $container->setParameter('wallabag_core.languages', $config['languages']);
18 $container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
19 $container->setParameter('wallabag_core.theme', $config['theme']);
20 $container->setParameter('wallabag_core.language', $config['language']);
21 $container->setParameter('wallabag_core.rss_limit', $config['rss_limit']);
22 $container->setParameter('wallabag_core.version', $config['version']);
23 $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
25 $loader = new Loader\
YamlFileLoader($container, new FileLocator(__DIR__
.'/../Resources/config'));
26 $loader->load('services.yml');
29 public function getAlias()
31 return 'wallabag_core';