1 | <?php namespace Limoncello\l10n\Format; |
||
25 | class Formatter implements FormatterInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $locale; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $namespace; |
||
36 | |||
37 | /** |
||
38 | * @var TranslatorInterface |
||
39 | */ |
||
40 | private $translator; |
||
41 | |||
42 | /** |
||
43 | * @param string $locale |
||
44 | * @param string $namespace |
||
45 | * @param TranslatorInterface $translator |
||
46 | */ |
||
47 | public function __construct(string $locale, string $namespace, TranslatorInterface $translator) |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getLocale(): string |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getNamespace(): string |
||
71 | |||
72 | /** |
||
73 | * @return TranslatorInterface |
||
74 | */ |
||
75 | public function getTranslator(): TranslatorInterface |
||
79 | |||
80 | /** |
||
81 | * @inheritdoc |
||
82 | */ |
||
83 | public function formatMessage(string $message, array $args = []): string |
||
89 | } |
||
90 |