src/generic/controller.php
protected function responseTemplate($template, $data = array()){
        
        if(!isset(hubert()->template)){
            throw new \Exception("no template engine installed");
        }
        $html = hubert()->template->render($template, $data);
        $this->_response->getBody()->write($html);
        
        return $this->_response;
        
    }
protected function responseTemplate($template, $data = array()){
        
        if(!isset(hubert()->template)){
            throw new \Exception("no template engine installed");
        }
        $html = hubert()->template->render($template, $data);
        $this->_response->getBody()->write($html);
        
        return $this->_response;
        
    }
protected function responseTemplate ( $ template , $ data = array ( ) ) { if ( ! isset ( hubert ( ) -> template ) ) { throw new \ Exception ( "no template engine installed" ) ; } $ html = hubert ( ) -> template -> render ( $ template , $ data ) ; $ this -> _response -> getBody ( ) -> write ( $ html ) ; return $ this -> _response ; }
render template in response
@param string $template
@param array $data
@return \Zend\Diactoros\Response
render template in response