1 | <?php namespace Limoncello\l10n\Format; |
||
26 | class Translator implements TranslatorInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var BundleStorageInterface |
||
30 | */ |
||
31 | private $storage; |
||
32 | |||
33 | /** |
||
34 | * @param BundleStorageInterface $storage |
||
35 | */ |
||
36 | public function __construct(BundleStorageInterface $storage) |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | * |
||
44 | * @SuppressWarnings(PHPMD.ElseExpression) |
||
45 | */ |
||
46 | public function translateMessage(string $locale, string $namespace, string $key, array $args = []): string |
||
58 | |||
59 | /** |
||
60 | * @return BundleStorageInterface |
||
61 | */ |
||
62 | public function getStorage(): BundleStorageInterface |
||
66 | |||
67 | /** |
||
68 | * @param BundleStorageInterface $storage |
||
69 | * |
||
70 | * @return Translator |
||
71 | */ |
||
72 | public function setStorage(BundleStorageInterface $storage): Translator |
||
78 | |||
79 | /** |
||
80 | * @param string $locale |
||
81 | * @param string $message |
||
82 | * @param array $args |
||
83 | * |
||
84 | * @return string |
||
85 | * |
||
86 | * @SuppressWarnings(PHPMD.StaticAccess) |
||
87 | */ |
||
88 | protected function formatMessage(string $locale, string $message, array $args): string |
||
92 | } |
||
93 |