db = \Zend_Registry::get('db'); $this->config = \Zend_Registry::get('config'); } public function checkParam(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); if(empty($data['uuid'])) { return "请填写数据UUID"; } if(!is_array($data['variable']) || count($data['variable']) < 1) { return "参数错误"; } return true; } public function processData(\Zend_EventManager_Event $e) { $data = $e->getParam('data'); foreach($data['variable'] as $k=>$v) { if(isset($v['condition'])) { if(preg_match("/;/",$v['condition'])) $data['variable'][$k]['condition'] = explode(";",$v['condition']); } } $data['variable'] = $this->encode($data['variable']); if(!isset($data['status'])) { $data['status'] = 1; } return $data; } public function recordPosted(\Zend_EventManager_Event $e) { $id = $e->getParam('id'); } public function recordChanged(\Zend_EventManager_Event $e) { $id = $e->getParam('id'); } }