Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

Application modulaire fonctionnelle !

Emmanuel ROY authored on 12/08/2019 15:10:25
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
-namespace Symfony\Component\Translation\DependencyInjection;
13
-
14
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
-use Symfony\Component\DependencyInjection\ContainerBuilder;
16
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
17
-use Symfony\Component\DependencyInjection\Reference;
18
-
19
-/**
20
- * Adds tagged translation.extractor services to translation extractor.
21
- */
22
-class TranslationExtractorPass implements CompilerPassInterface
23
-{
24
-    private $extractorServiceId;
25
-    private $extractorTag;
26
-
27
-    public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor')
28
-    {
29
-        $this->extractorServiceId = $extractorServiceId;
30
-        $this->extractorTag = $extractorTag;
31
-    }
32
-
33
-    public function process(ContainerBuilder $container)
34
-    {
35
-        if (!$container->hasDefinition($this->extractorServiceId)) {
36
-            return;
37
-        }
38
-
39
-        $definition = $container->getDefinition($this->extractorServiceId);
40
-
41
-        foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) {
42
-            if (!isset($attributes[0]['alias'])) {
43
-                throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id));
44
-            }
45
-
46
-            $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]);
47
-        }
48
-    }
49
-}
Browse code

initial commit

Emmanuel ROY authored on 09/08/2019 08:39:02
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,49 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+namespace Symfony\Component\Translation\DependencyInjection;
13
+
14
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
+use Symfony\Component\DependencyInjection\ContainerBuilder;
16
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
17
+use Symfony\Component\DependencyInjection\Reference;
18
+
19
+/**
20
+ * Adds tagged translation.extractor services to translation extractor.
21
+ */
22
+class TranslationExtractorPass implements CompilerPassInterface
23
+{
24
+    private $extractorServiceId;
25
+    private $extractorTag;
26
+
27
+    public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor')
28
+    {
29
+        $this->extractorServiceId = $extractorServiceId;
30
+        $this->extractorTag = $extractorTag;
31
+    }
32
+
33
+    public function process(ContainerBuilder $container)
34
+    {
35
+        if (!$container->hasDefinition($this->extractorServiceId)) {
36
+            return;
37
+        }
38
+
39
+        $definition = $container->getDefinition($this->extractorServiceId);
40
+
41
+        foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) {
42
+            if (!isset($attributes[0]['alias'])) {
43
+                throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id));
44
+            }
45
+
46
+            $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]);
47
+        }
48
+    }
49
+}