freenet-router |
Subversion Repositories: |
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');
}
}
}