jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Views/] [SimpleView.php] - Rev 2

Compare with Previous - Blame - Download


<?php
namespace Phem\Views;

use Phem\Environment\EnvironmentManager;
use Twig_Environment;
/**
 *
 * @author kubapet
 */
class SimpleView extends View
{
    public function display()
    {
        $twig = EnvironmentManager::getTwig();
        
        if (!($twig instanceof Twig_Environment))
            die ('Twig environment unavailable');
        
        try 
        {
            echo $twig->render($this->template,$this->content->toArray());
        }
        catch (Twig_Error_Loader $ex)
        {
            die('Template not found');
        }
    }
}

Powered by WebSVN 2.2.1