public function createAction() { if (!$this->_auth->hasIdentity()) { return; } if (!$this->getRequest()->isPost()) { return; } if (!($query = $this->_getParam('query'))) { return; } $records = new Application_Model_Records(); $records->create($query, $this->_auth->getIdentity()); }