aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/DependencyInjection
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-10-23 14:01:27 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:24:17 +0100
commitff7b031d5792f7b6fd43b508d89397775bd1433c (patch)
tree7a7c515e8d4ff774ccbdb12845d235b3e1cfbfd2 /src/Wallabag/ImportBundle/DependencyInjection
parent1f4408de9ed08f3b0fda45a93f1585c80feeb21d (diff)
downloadwallabag-ff7b031d5792f7b6fd43b508d89397775bd1433c.tar.gz
wallabag-ff7b031d5792f7b6fd43b508d89397775bd1433c.tar.zst
wallabag-ff7b031d5792f7b6fd43b508d89397775bd1433c.zip
refactor pocket import
Diffstat (limited to 'src/Wallabag/ImportBundle/DependencyInjection')
-rw-r--r--src/Wallabag/ImportBundle/DependencyInjection/Configuration.php17
-rw-r--r--src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php25
2 files changed, 42 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php
new file mode 100644
index 00000000..bacaff31
--- /dev/null
+++ b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php
@@ -0,0 +1,17 @@
1<?php
2
3namespace Wallabag\ImportBundle\DependencyInjection;
4
5use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8class Configuration implements ConfigurationInterface
9{
10 public function getConfigTreeBuilder()
11 {
12 $treeBuilder = new TreeBuilder();
13 $rootNode = $treeBuilder->root('wallabag_import');
14
15 return $treeBuilder;
16 }
17}
diff --git a/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php b/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php
new file mode 100644
index 00000000..4efcaace
--- /dev/null
+++ b/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php
@@ -0,0 +1,25 @@
1<?php
2
3namespace Wallabag\ImportBundle\DependencyInjection;
4
5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\Config\FileLocator;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\DependencyInjection\Loader;
9
10class WallabagImportExtension extends Extension
11{
12 public function load(array $configs, ContainerBuilder $container)
13 {
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
16
17 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
18 $loader->load('services.yml');
19 }
20
21 public function getAlias()
22 {
23 return 'wallabag_import';
24 }
25}