Beispiel #1
0
 /**
  * Renders a view
  *
  * @param string $uView       view file
  * @param mixed  $uModel      view model
  * @param mixed  $uController controller instance
  *
  * @return void
  */
 public function view($uView, $uModel = null, $uController = null)
 {
     if ($uModel === null) {
         $uModel = $this->vars->toArray();
     }
     if (strncmp($uView, "\\", 1) === 0) {
         Views::viewFile($uView, $uModel, $this);
     } else {
         $tNamespace = $this->application->config["modules"][$this->routeInfo["module"]]["namespace"];
         Views::viewFile("{$tNamespace}\\Views\\{$uView}", $uModel, $this);
     }
 }