Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function getContent(string $view, array $config): string |
||
8 | { |
||
9 | $file = getcwd() . '/' . $config['template_dir'] . "/$view.html"; |
||
10 | |||
11 | if (!file_exists($file)) { |
||
12 | throw new \Exception("$file template not found"); // @codeCoverageIgnore |
||
13 | } |
||
14 | |||
15 | return $this->removeTags(file_get_contents($file)); |
||
16 | } |
||
23 |