]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php
Fix utf8mb4 on vendor tables
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / DependencyInjection / WallabagImportExtension.php
1 <?php
2
3 namespace Wallabag\ImportBundle\DependencyInjection;
4
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;
9
10 class WallabagImportExtension extends Extension
11 {
12 public function load(array $configs, ContainerBuilder $container)
13 {
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
16 $container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']);
17 $container->setParameter('wallabag_import.resource_dir', $config['resource_dir']);
18
19 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
20 $loader->load('services.yml');
21 }
22
23 public function getAlias()
24 {
25 return 'wallabag_import';
26 }
27 }