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