Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class MessagesCatalog { |
||
17 | protected $messagesDomains; |
||
18 | /** |
||
19 | * |
||
20 | * @var LoaderInterface |
||
21 | */ |
||
22 | protected $loader; |
||
23 | protected $locale; |
||
24 | |||
25 | 1 | public function __construct($locale, LoaderInterface $loader) { |
|
26 | 1 | $this->locale = $locale; |
|
27 | 1 | $this->loader = $loader; |
|
28 | 1 | $this->messagesDomains = [ ]; |
|
29 | 1 | } |
|
30 | |||
31 | 1 | public function load() { |
|
32 | 1 | $this->messagesDomains = [ ]; |
|
33 | 1 | $domains = $this->getDomains (); |
|
34 | 1 | foreach ( $domains as $domain ) { |
|
35 | 1 | $do = new MessagesDomain ( $this->locale, $this->loader, $domain ); |
|
36 | 1 | $do->load (); |
|
37 | 1 | $this->messagesDomains [] = $do; |
|
38 | } |
||
39 | 1 | } |
|
40 | |||
41 | 1 | public function getDomains() { |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * @return MessagesDomain[] |
||
48 | */ |
||
49 | 1 | public function getMessagesDomains() { |
|
51 | } |
||
52 | } |
||
53 | |||
54 |