public static function getInstance() { if(!(self::$instance instanceof self)) { self::$instance = new self(); } return self::$instance; }
/** * 活动来源接口 * @param string $uid 用户id * @param string $source 来源资源值 * @param $string $memo 来源值备注 */ public function source($uid,$source,$memo= "") { //附加信息可以为空 if($flag = SourceOper::getInstance()->insertUsource($this->actionInfo['id'], $uid,$source,$memo)) { return array('flag'=>1,'desc'=>'成功'); } else { return array('flag'=>0,'desc'=>'系统错误'); } }