| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function render($viewFile, $data, $return = false) |
||
| 24 | { |
||
| 25 | $loader = new Twig_Loader_Filesystem(dirname($viewFile)); |
||
| 26 | $twig = new Twig_Environment($loader, array( |
||
| 27 | 'cache' => 'runtime', |
||
| 28 | )); |
||
| 29 | |||
| 30 | if ($return) |
||
| 31 | { |
||
| 32 | return $twig->render(basename($viewFile), $data); |
||
| 33 | } |
||
| 34 | else |
||
| 35 | { |
||
| 36 | return $twig->display(basename($viewFile), $data); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 41 |