1 | <?php |
||
17 | class Language |
||
18 | { |
||
19 | /** |
||
20 | * Config. |
||
21 | * |
||
22 | * @var Config |
||
23 | */ |
||
24 | protected $config; |
||
25 | /** |
||
26 | * Current language. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $language; |
||
31 | |||
32 | /** |
||
33 | * Language constructor. |
||
34 | * |
||
35 | * @param Config $config |
||
36 | * @param string|null $language |
||
37 | */ |
||
38 | public function __construct(Config $config, string $language = null) |
||
43 | |||
44 | public function __toString() |
||
52 | |||
53 | public function getName(): ?string |
||
59 | |||
60 | public function getLocale(): ?string |
||
66 | |||
67 | public function getWeight(): int |
||
75 | |||
76 | private function hasProperty(string $property): bool |
||
92 | } |
||
93 |