_flow = $args['flow']; $this->_reason = $args['reason']; $this->_responsible = $args['responsible']; } /** * 定则入口 * @param array $data * @return void * @author **/ public function rulerule($data) { try { $object = kernel::single('taoguaniostockorder_diff_process_' . $this->_responsible); if (!($object instanceof taoguaniostockorder_diff_process_abstract)) { return [false, '差异处理类必须继承父类']; } $method = $this->_flow . ucfirst($this->_reason); if (!method_exists($object, $method)) { return [false, '差异处理类缺少处理[' . $method . ']场景']; } return call_user_func_array(array($object, $method), array($data)); } catch (Exception $e) { return [false, $e->getMessage()]; } } }