jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Views/] [SimpleView.php] - Blame information for rev 2

 

Line No. Rev Author Line
12simandl<?php
2namespace Phem\Views;
3 
4use Phem\Environment\EnvironmentManager;
5use Twig_Environment;
6/**
7 *
8 * @author kubapet
9 */
10class SimpleView extends View
11{
12 public function display()
13 {
14 $twig = EnvironmentManager::getTwig();
15 
16 if (!($twig instanceof Twig_Environment))
17 die ('Twig environment unavailable');
18 
19 try
20 {
21 echo $twig->render($this->template,$this->content->toArray());
22 }
23 catch (Twig_Error_Loader $ex)
24 {
25 die('Template not found');
26 }
27 }
28}

Powered by WebSVN 2.2.1