Conditions | 3 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
42 | public function render($template, array $values = [], $basePath = null) |
||
43 | { |
||
44 | if (!isset($basePath)) { |
||
45 | $basePath = $this->basePath; |
||
46 | } |
||
47 | if (!file_exists("{$basePath}/{$template}")) { |
||
48 | throw new FileNotFoundException("Cannot find the file, {$basePath}/{$template}"); |
||
49 | } |
||
50 | return $this->latte->renderToString("{$basePath}/{$template}" , $values + $this->values); |
||
51 | } |
||
52 | } |
||
53 |