protected function renderTemplate($path = false)
    {
        if(!$this->templateEngine) {
            throw new \Exception('template engine not injected');
        }
        if(!$path) {
            $path = sprintf('%s/%s/%s', AREA, $this->name, $this->action);
        }
        $this->setCommonTemplateParameters();
        $html = $this->templateEngine->render($path, $this->templateParameters);
        $this->httpStream->write($html);
        return $html;
    }
protected function renderTemplate($path = false)
    {
        if(!$this->templateEngine) {
            throw new \Exception('template engine not injected');
        }
        if(!$path) {
            $path = sprintf('%s/%s/%s', AREA, $this->name, $this->action);
        }
        $this->setCommonTemplateParameters();
        $html = $this->templateEngine->render($path, $this->templateParameters);
        $this->httpStream->write($html);
        return $html;
    }
protected function renderTemplate ( $ path = false ) { if ( ! $ this -> templateEngine ) { throw new \ Exception ( 'template engine not injected' ) ; } if ( ! $ path ) { $ path = sprintf ( '%s/%s/%s' , AREA , $ this -> name , $ this -> action ) ; } $ this -> setCommonTemplateParameters ( ) ; $ html = $ this -> templateEngine -> render ( $ path , $ this -> templateParameters ) ; $ this -> httpStream -> write ( $ html ) ; return $ html ; }
Renders template and writes output to HTTP stream
@param string $path;
@return string HTML content
Renders template and writes output to HTTP stream