src/mg/Ding/Mvc/Http/TwigViewRender.php
public function render(View $view)
    {
        /**
         * @todo is there a better way to do this?
         */
        global $modelAndView;
        $modelAndView = $view->getModelAndView();
        require_once 'Twig' . DIRECTORY_SEPARATOR . 'Autoloader.php';
        \Twig_Autoloader::register();
        $loader = new \Twig_Loader_Filesystem(dirname($view->getPath()));
        $twig = new \Twig_Environment($loader, array($this->_twigOptions));
        $template = $twig->loadTemplate(basename($view->getPath()));
        echo $template->render(array('vars' => $modelAndView->getModel()));
    }
public function render(View $view)
    {
        /**
         * @todo is there a better way to do this?
         */
        global $modelAndView;
        $modelAndView = $view->getModelAndView();
        require_once 'Twig' . DIRECTORY_SEPARATOR . 'Autoloader.php';
        \Twig_Autoloader::register();
        $loader = new \Twig_Loader_Filesystem(dirname($view->getPath()));
        $twig = new \Twig_Environment($loader, array($this->_twigOptions));
        $template = $twig->loadTemplate(basename($view->getPath()));
        echo $template->render(array('vars' => $modelAndView->getModel()));
    }
(non-PHPdoc)
@see Ding\Mvc.IViewRender::render()