1 | <?php declare (strict_types = 1); |
||
33 | class Translator implements TranslatorInterface |
||
34 | { |
||
35 | /** |
||
36 | * @var BundleStorageInterface |
||
37 | */ |
||
38 | private $storage; |
||
39 | |||
40 | /** |
||
41 | * @param BundleStorageInterface $storage |
||
42 | */ |
||
43 | 4 | public function __construct(BundleStorageInterface $storage) |
|
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | * |
||
51 | * @SuppressWarnings(PHPMD.ElseExpression) |
||
52 | */ |
||
53 | 4 | public function translateMessage(string $locale, string $namespace, string $message, array $args = []): string |
|
63 | |||
64 | /** |
||
65 | * @return BundleStorageInterface |
||
66 | */ |
||
67 | 4 | public function getStorage(): BundleStorageInterface |
|
71 | |||
72 | /** |
||
73 | * @param BundleStorageInterface $storage |
||
74 | * |
||
75 | * @return TranslatorInterface |
||
76 | */ |
||
77 | 4 | public function setStorage(BundleStorageInterface $storage): TranslatorInterface |
|
83 | |||
84 | /** |
||
85 | * @param string $locale |
||
86 | * @param string $message |
||
87 | * @param array $args |
||
88 | * |
||
89 | * @return string |
||
90 | * |
||
91 | * @SuppressWarnings(PHPMD.StaticAccess) |
||
92 | */ |
||
93 | 4 | protected static function formatMessage(string $locale, string $message, array $args): string |
|
115 | } |
||
116 |