db = \Zend_Registry::get('db'); }else{ $this->db = $db; } $this->config = \Zend_Registry::get('config'); $this->table = new Table(); } public function checkFundParam(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); if(!is_array($data)) { return "参数错误"; } if(empty($data["title"])) { return "请输入标题"; } return true; } public function processFundData(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); return $data; } public function insertToFundTable(\Zend_EventManager_Event $e) { return true; } public function checkMdfundParam(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); if(!is_array($data)) { return "参数错误"; } if(empty($data["fid"])) { return "请填写项目ID"; } if(empty($data['uuid'])) { return "请填写UUID"; } if(!view::isUuid($data['uuid'])) { return "UUID格式不正确"; } return true; } public function processMdfundData(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); if(empty($data['place'])) { $data['place'] = 0; } if(!is_numeric($data['place'])) { $data['place'] = 0; } return $data; } }