public function addAction() { parent::addAction(); if ($this->getRequest()->isPost()) { try { $data = (object) $this->getRequest()->getPost(); $this->_entity = Application_Model_City::create(); $this->_setData($data); $this->_entity->save(); $this->__goBack(); } catch (Exception $e) { $this->view->showMessage($e); } } }