Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function __construct(string $path) |
||
20 | { |
||
21 | if (!class_exists('Symfony\Component\Yaml\Yaml')) { |
||
22 | throw new Exception('Yaml not installed. composer require symfony/yaml'); |
||
23 | } |
||
24 | |||
25 | $contents = file_get_contents($path); |
||
26 | $data = Yaml::parse($contents); |
||
27 | parent::__construct($data); |
||
28 | } |
||
29 | } |
||
30 |