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,61 +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;
13
-
14
-use Symfony\Component\Translation\TranslatorInterface as LegacyTranslatorInterface;
15
-use Symfony\Contracts\Translation\TranslatorInterface;
16
-use Symfony\Contracts\Translation\TranslatorTrait;
17
-
18
-/**
19
- * IdentityTranslator does not translate anything.
20
- *
21
- * @author Fabien Potencier <fabien@symfony.com>
22
- */
23
-class IdentityTranslator implements LegacyTranslatorInterface, TranslatorInterface
24
-{
25
-    use TranslatorTrait;
26
-
27
-    private $selector;
28
-
29
-    /**
30
-     * @param MessageSelector|null $selector The message selector for pluralization
31
-     */
32
-    public function __construct(MessageSelector $selector = null)
33
-    {
34
-        $this->selector = $selector;
35
-
36
-        if (__CLASS__ !== \get_class($this)) {
37
-            @trigger_error(sprintf('Calling "%s()" is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
38
-        }
39
-    }
40
-
41
-    /**
42
-     * {@inheritdoc}
43
-     *
44
-     * @deprecated since Symfony 4.2, use the trans() method instead with a %count% parameter
45
-     */
46
-    public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null)
47
-    {
48
-        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%%count%%" parameter.', __METHOD__), E_USER_DEPRECATED);
49
-
50
-        if ($this->selector) {
51
-            return strtr($this->selector->choose((string) $id, $number, $locale ?: $this->getLocale()), $parameters);
52
-        }
53
-
54
-        return $this->trans($id, ['%count%' => $number] + $parameters, $domain, $locale);
55
-    }
56
-
57
-    private function getPluralizationRule(int $number, string $locale): int
58
-    {
59
-        return PluralizationRules::get($number, $locale, false);
60
-    }
61
-}
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,61 @@
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;
13
+
14
+use Symfony\Component\Translation\TranslatorInterface as LegacyTranslatorInterface;
15
+use Symfony\Contracts\Translation\TranslatorInterface;
16
+use Symfony\Contracts\Translation\TranslatorTrait;
17
+
18
+/**
19
+ * IdentityTranslator does not translate anything.
20
+ *
21
+ * @author Fabien Potencier <fabien@symfony.com>
22
+ */
23
+class IdentityTranslator implements LegacyTranslatorInterface, TranslatorInterface
24
+{
25
+    use TranslatorTrait;
26
+
27
+    private $selector;
28
+
29
+    /**
30
+     * @param MessageSelector|null $selector The message selector for pluralization
31
+     */
32
+    public function __construct(MessageSelector $selector = null)
33
+    {
34
+        $this->selector = $selector;
35
+
36
+        if (__CLASS__ !== \get_class($this)) {
37
+            @trigger_error(sprintf('Calling "%s()" is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
38
+        }
39
+    }
40
+
41
+    /**
42
+     * {@inheritdoc}
43
+     *
44
+     * @deprecated since Symfony 4.2, use the trans() method instead with a %count% parameter
45
+     */
46
+    public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null)
47
+    {
48
+        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%%count%%" parameter.', __METHOD__), E_USER_DEPRECATED);
49
+
50
+        if ($this->selector) {
51
+            return strtr($this->selector->choose((string) $id, $number, $locale ?: $this->getLocale()), $parameters);
52
+        }
53
+
54
+        return $this->trans($id, ['%count%' => $number] + $parameters, $domain, $locale);
55
+    }
56
+
57
+    private function getPluralizationRule(int $number, string $locale): int
58
+    {
59
+        return PluralizationRules::get($number, $locale, false);
60
+    }
61
+}