public function addstaturesAction() { $this->_helper->viewRenderer->setNoRender(true); if ($this->auth->hasIdentity()) { $addstatures = new Application_Model_Stature($this->registry['DB']); $text = $this->getRequest()->getParam('text'); $visi = $this->getRequest()->getParam('visi'); $cpt = $this->getRequest()->getParam('cpt'); echo json_encode($addstatures->addStatures($text, $visi, $cpt)); } else { echo json_encode(array('status' => 'error')); } }