Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
20 | public function getTemplatePath($templateName) |
||
21 | { |
||
22 | $filename = sprintf( |
||
23 | '%s%s', |
||
24 | self::getRootTemplateDir(), |
||
25 | $templateName |
||
26 | ); |
||
27 | |||
28 | if (!file_exists($filename)) { |
||
29 | throw new \Exception(sprintf('template "%s" not found !', $filename)); |
||
30 | } |
||
31 | |||
32 | return realpath($filename); |
||
33 | } |
||
34 | |||
50 |