/** * Sets a new View (object) * * @param string|View $view */ public function setView($view) { $this->view = $view; // construct the view if needed if (!$this->view instanceof View) { $this->view = $this->viewManager->forge($this->view); } }