public function renderView($template, $data = [])
    {
        $template = $this->di->get("views")->getTemplateFile($template);
        $view = $this->di->get("view");
        $view->setDI($this->di);
        $view->set($template, $data);
        $view->render();
    }
public function renderView($template, $data = [])
    {
        $template = $this->di->get("views")->getTemplateFile($template);
        $view = $this->di->get("view");
        $view->setDI($this->di);
        $view->set($template, $data);
        $view->render();
    }
public function renderView ( $ template , $ data = [ ] ) { $ template = $ this -> di -> get ( "views" ) -> getTemplateFile ( $ template ) ; $ view = $ this -> di -> get ( "view" ) ; $ view -> setDI ( $ this -> di ) ; $ view -> set ( $ template , $ data ) ; $ view -> render ( ) ; }
Render a view with an optional data set of variables.

@param string $template the template file, or array
@param array  $data     variables to make available to the
view, default is empty

@return void
Render a view with an optional data set of variables .