| 1 | <?php |
||
| 16 | class TemplateRenderer implements TemplateRendererInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Twig environment instance. |
||
| 20 | * |
||
| 21 | * @var \Twig_Environment |
||
| 22 | * @access protected |
||
| 23 | */ |
||
| 24 | protected $twig; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Internal constructor. |
||
| 28 | * |
||
| 29 | * @access public |
||
| 30 | * @param \Twig_Environment $twig |
||
| 31 | */ |
||
| 32 | 15 | public function __construct(\Twig_Environment $twig) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Render template. |
||
| 39 | * |
||
| 40 | * @access public |
||
| 41 | * @param string $template |
||
| 42 | * @param array $context (default: array()) |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 54 | public function render($template, array $context = array()) |
|
| 51 | } |
||
| 52 |