Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 3 |
1 | <?php |
||
27 | public function render($file, array $data) |
||
28 | { |
||
29 | if (!is_null($this->cacheDir)) { |
||
30 | $mustache = new Mustache_Engine([ |
||
31 | 'cache' => $this->cacheDir, |
||
32 | 'partials_loader' => new Mustache_Loader_FilesystemLoader($this->partialsDir) |
||
33 | ]); |
||
34 | } else { |
||
35 | $mustache = new Mustache_Engine([ |
||
36 | 'partials_loader' => new Mustache_Loader_FilesystemLoader($this->partialsDir) |
||
37 | ]); |
||
38 | } |
||
39 | |||
40 | return $mustache->render(file_get_contents($file), $data); |
||
41 | } |
||
42 | } |
||
43 |