public function switchAction() { $instance = $this->params('instance'); try { $this->instanceManager->switchInstance($instance); } catch (InstanceNotFoundException $e) { $this->getResponse()->setStatusCode(404); return; } return $this->redirect()->toRoute('home'); }