public function render($filename, $vars = array())
    {
        $localTemplate = $this->templateDir . '/' . $filename;
        $themeTemplate = locate_template($filename);

        if (!file_exists($localTemplate) && !file_exists($themeTemplate)) {
            throw new NotFoundException("View at $localTemplate or $themeTemplate not found");
        }

        $this->viewData = $vars;

        $template = file_exists($localTemplate) ? $localTemplate : $themeTemplate;

        ob_start();
        include($template);
        $view = ob_get_contents();
        ob_end_clean();

        return $view;
    }
public function render($filename, $vars = array())
    {
        $localTemplate = $this->templateDir . '/' . $filename;
        $themeTemplate = locate_template($filename);

        if (!file_exists($localTemplate) && !file_exists($themeTemplate)) {
            throw new NotFoundException("View at $localTemplate or $themeTemplate not found");
        }

        $this->viewData = $vars;

        $template = file_exists($localTemplate) ? $localTemplate : $themeTemplate;

        ob_start();
        include($template);
        $view = ob_get_contents();
        ob_end_clean();

        return $view;
    }
public function render ( $ filename , $ vars = array ( ) ) { $ localTemplate = $ this -> templateDir . '/' . $ filename ; $ themeTemplate = locate_template ( $ filename ) ; if ( ! file_exists ( $ localTemplate ) && ! file_exists ( $ themeTemplate ) ) { throw new NotFoundException ( "View at $localTemplate or $themeTemplate not found" ) ; } $ this -> viewData = $ vars ; $ template = file_exists ( $ localTemplate ) ? $ localTemplate : $ themeTemplate ; ob_start ( ) ; include ( $ template ) ; $ view = ob_get_contents ( ) ; ob_end_clean ( ) ; return $ view ; }
Renders a template file.

Assigns all $var keys to $this->$key for us in template.

@param  string $filename Full-filename
@param  array  $vars     View variables
@return string           Rendered view

@throws \Tev\View\Exception\NotFoundException If view file not found
Renders a template file .