1 | <?php |
||
12 | class Locale implements ServiceTranslationProvider |
||
13 | { |
||
14 | |||
15 | const DOMAIN = 'messages'; |
||
16 | const LANG_DIR = ROOT . '/cache/lang/'; |
||
17 | |||
18 | /** |
||
19 | * @var string[] |
||
20 | */ |
||
21 | private $locales; |
||
22 | |||
23 | /** |
||
24 | * @Inject({"%locales%", "%application.defaultLocale%"}); |
||
25 | * @param string[] $locales |
||
26 | * @param string $defaultLocale |
||
27 | */ |
||
28 | 3 | public function __construct(array $locales, string $defaultLocale = '') |
|
36 | |||
37 | /** |
||
38 | * @return string[] |
||
39 | */ |
||
40 | 1 | public function getLocales() : array |
|
44 | |||
45 | /** |
||
46 | * @param string $locale |
||
47 | * @codeCoverageIgnore |
||
48 | */ |
||
49 | public function setLocale(string $locale) |
||
58 | |||
59 | /** |
||
60 | * @return string[] |
||
61 | */ |
||
62 | public function getTokens() |
||
68 | } |
||
69 |