Total Complexity | 5 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | class Definitions |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $array; |
||
22 | |||
23 | /** |
||
24 | * @var Definitions\Caches |
||
25 | */ |
||
26 | private $caches; |
||
27 | |||
28 | /** |
||
29 | * @var Definitions\Services |
||
30 | */ |
||
31 | private $services; |
||
32 | |||
33 | /** |
||
34 | * Definitions constructor. |
||
35 | * |
||
36 | * @param array $array |
||
37 | */ |
||
38 | 1 | public function __construct(array $array) |
|
39 | { |
||
40 | 1 | Lib::v($array['caches'], array()); |
|
41 | |||
42 | 1 | $this->caches = $this->parseDefinitionsCaches($array['caches']); |
|
43 | |||
44 | 1 | Lib::v($array['services'], array()); |
|
45 | |||
46 | 1 | $this->services = $this->parseDefinitionsServices($array['services']); |
|
47 | |||
48 | 1 | $this->array = $array; |
|
49 | 1 | } |
|
50 | |||
51 | /** |
||
52 | * @return Caches |
||
53 | */ |
||
54 | 1 | public function getCaches() |
|
55 | { |
||
56 | 1 | return $this->caches; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return Services |
||
61 | */ |
||
62 | 1 | public function getServices() |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * @param array $array |
||
69 | * |
||
70 | * @return Caches |
||
71 | */ |
||
72 | 1 | private function parseDefinitionsCaches(array $array) |
|
73 | { |
||
74 | 1 | return new Caches($array); |
|
75 | } |
||
76 | |||
77 | /** |
||
78 | * @param array $array |
||
79 | * |
||
80 | * @return Services |
||
81 | */ |
||
82 | 1 | private function parseDefinitionsServices(array $array) |
|
85 | } |
||
86 | } |
||
87 |