/**
  * Sets view component.
  *
  * @param ViewComponentInterface $view
  * @return $this
  */
 public function setView(ViewComponentInterface $view = null)
 {
     if ($view === $this->view) {
         return $this;
     }
     $this->view && $this->view->detach();
     $view && $view->attachTo($this);
     $this->view = $view;
     return $this;
 }