| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | protected function render($view, array $data = array()){
|
||
| 12 | |||
| 13 | $ref = new \ReflectionClass($this); |
||
| 14 | |||
| 15 | $tpl = (new \SplFileInfo($ref->getFileName()))->getPath() . DIRECTORY_SEPARATOR . 'tpl'; |
||
| 16 | |||
| 17 | $twig = new \Twig_Environment(new \Twig_Loader_Filesystem($tpl)); |
||
| 18 | |||
| 19 | return $twig->render($view . '.twig', $data); |
||
| 20 | } |
||
| 21 | |||
| 41 |