public function render($tpl, $params = [])
    {
        $this->setTemplate($tpl);
        $this->params = (object) $params;
        return $this->retrieve();
    }
public function render($tpl, $params = [])
    {
        $this->setTemplate($tpl);
        $this->params = (object) $params;
        return $this->retrieve();
    }
public function render ( $ tpl , $ params = [ ] ) { $ this -> setTemplate ( $ tpl ) ; $ this -> params = ( object ) $ params ; return $ this -> retrieve ( ) ; }
Set the template name, assign params array and return rendered output in one method.
Call this function in routes and controllers.

@param string $tpl
@param array $params
@return string
Set the template name assign params array and return rendered output in one method . Call this function in routes and controllers .