public function display($template, array $vars = array())
    {
        if (null === ($path = $this->locator->locate($template))) {
            throw TemplateNotFoundException::format(
                'The template "%s" does not exist.',
                $template
            );
        }

        $this->renderInScope(
            $path,
            array_replace($this->getArrayCopy(), $vars)
        );
    }
public function display($template, array $vars = array())
    {
        if (null === ($path = $this->locator->locate($template))) {
            throw TemplateNotFoundException::format(
                'The template "%s" does not exist.',
                $template
            );
        }

        $this->renderInScope(
            $path,
            array_replace($this->getArrayCopy(), $vars)
        );
    }
public function display ( $ template , array $ vars = array ( ) ) { if ( null === ( $ path = $ this -> locator -> locate ( $ template ) ) ) { throw TemplateNotFoundException :: format ( 'The template "%s" does not exist.' , $ template ) ; } $ this -> renderInScope ( $ path , array_replace ( $ this -> getArrayCopy ( ) , $ vars ) ) ; }
Renders a template and displays the result.

@param string  $template The name of the template.
@param array   $vars     The template variables.

@throws TemplateNotFoundException If the template does not exist.
Renders a template and displays the result .