/** * @param null $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['1'] = 'PBString'; $this->values['1'] = ''; $this->fields['2'] = 'PBString'; $this->values['2'] = ''; $this->fields['3'] = 'PBString'; $this->values['3'] = ''; $this->fields['4'] = 'PBString'; $this->values['4'] = ''; $this->fields['5'] = 'PBString'; $this->values['5'] = ''; $this->fields['6'] = 'PBString'; $this->values['6'] = ''; $this->fields['7'] = 'PBString'; $this->values['7'] = ''; $this->fields['8'] = 'PBString'; $this->values['8'] = ''; $this->fields['9'] = 'PBString'; $this->values['9'] = ''; $this->fields['10'] = 'PBInt'; $this->values['10'] = ''; $this->fields["11"] = "PBBool"; $this->values["11"] = ""; $this->fields["12"] = "PBString"; $this->values["12"] = ""; $this->fields["13"] = "PBBool"; $this->values["13"] = ""; $this->fields["14"] = "PBString"; $this->values["14"] = ""; }
/** * @param null $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['1'] = 'PushResult'; $this->values['1'] = array(); }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["2"] = "PBString"; $this->values["2"] = array(); $this->fields["3"] = "AddressBook_PhoneType"; $this->values["3"] = array(); }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "StoryResponse_ResponseType"; $this->values["1"] = ""; $this->fields["2"] = "PBString"; $this->values["2"] = ""; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "\\wh\\getui\\protobuf\\type\\PBString"; $this->values["1"] = ""; $this->fields["2"] = "\\wh\\getui\\protobuf\\type\\PBString"; $this->values["2"] = ""; }
/** * @param null $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['1'] = 'PBInt'; $this->values['1'] = ''; $this->fields['2'] = 'PBString'; $this->values['2'] = ''; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "PBString"; $this->values["1"] = ""; $this->fields["2"] = "PBString"; $this->values["2"] = ""; $this->fields["3"] = "PBString"; $this->values["3"] = ""; }
public function __construct($reader = null) { parent::__construct($reader); self::$fields["a"]["9"] = "PBString"; $this->values["9"] = ""; self::$fieldNames["a"]["9"] = "id"; self::$fields["a"]["1"] = "PBString"; $this->values["1"] = ""; self::$fieldNames["a"]["1"] = "clientname"; self::$fields["a"]["4"] = "b"; $this->values["4"] = array(); self::$fieldNames["a"]["4"] = "conf"; }
/** * @param null $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['2'] = 'Transparent'; $this->values['2'] = ''; $this->fields['3'] = 'PBString'; $this->values['3'] = ''; $this->fields['4'] = 'PBInt'; $this->values['4'] = ''; $this->fields['5'] = 'PBInt'; $this->values['5'] = ''; $this->fields['6'] = 'PBInt'; $this->values['6'] = ''; $this->fields['7'] = 'PBBool'; $this->values['7'] = ''; $this->values['7'] = new PBBool(); $this->values['7']->value = true; $this->fields['8'] = 'PBInt'; $this->values['8'] = ''; }
/** * @param null $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['1'] = 'PBString'; $this->values['1'] = ''; $this->fields['2'] = 'PBString'; $this->values['2'] = ''; $this->fields['3'] = 'PBString'; $this->values['3'] = ''; $this->fields['4'] = 'PBString'; $this->values['4'] = ''; $this->fields['5'] = 'PBString'; $this->values['5'] = ''; $this->fields['6'] = 'PBString'; $this->values['6'] = ''; $this->fields['7'] = 'PushInfo'; $this->values['7'] = ''; $this->fields['8'] = 'ActionChain'; $this->values['8'] = array(); $this->fields['9'] = 'PBString'; $this->values['9'] = array(); }
public function __construct($reader = null) { parent::__construct($reader); }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "ServerNotify_NotifyType"; $this->values["1"] = ""; $this->fields["2"] = "PBString"; $this->values["2"] = ""; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "Entry_Assign"; $this->values["1"] = ""; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "DialogData"; $this->values["1"] = array(); $this->fields["2"] = "PBInt"; $this->values["2"] = ""; }
public function __construct($reader = null) { parent::__construct($reader); self::$fields["TZResponse"]["1"] = "TZResult"; $this->values["1"] = array(); self::$fieldNames["TZResponse"]["1"] = "result"; self::$fields["TZResponse"]["2"] = "PBInt"; $this->values["2"] = ""; self::$fieldNames["TZResponse"]["2"] = "timestamp"; self::$fields["TZResponse"]["3"] = "TZError"; $this->values["3"] = ""; self::$fieldNames["TZResponse"]["3"] = "error"; }
/** * @param object $reader */ public function __construct($reader = null) { parent::__construct($reader); $this->wired_type = PBMessage::WIRED_LENGTH_DELIMITED; $this->fields['1'] = 'PBInt'; $this->values['1'] = ''; $this->fields['2'] = 'ActionChainType'; $this->values['2'] = ''; $this->fields['3'] = 'PBInt'; $this->values['3'] = ''; $this->fields['100'] = 'PBString'; $this->values['100'] = ''; $this->fields['101'] = 'PBString'; $this->values['101'] = ''; $this->fields['102'] = 'PBString'; $this->values['102'] = ''; $this->fields['103'] = 'PBString'; $this->values['103'] = ''; $this->fields['104'] = 'PBBool'; $this->values['104'] = ''; $this->fields['105'] = 'PBBool'; $this->values['105'] = ''; $this->fields['106'] = 'PBBool'; $this->values['106'] = ''; $this->fields['107'] = 'PBString'; $this->values['107'] = ''; $this->fields['120'] = 'PBString'; $this->values['120'] = ''; $this->fields['121'] = 'Button'; $this->values['121'] = array(); $this->fields['140'] = 'PBString'; $this->values['140'] = ''; $this->fields['141'] = 'AppStartUp'; $this->values['141'] = ''; $this->fields['142'] = 'PBBool'; $this->values['142'] = ''; $this->fields['143'] = 'PBInt'; $this->values['143'] = ''; $this->fields['160'] = 'PBString'; $this->values['160'] = ''; $this->fields['161'] = 'PBString'; $this->values['161'] = ''; $this->fields['162'] = 'PBBool'; $this->values['162'] = ''; $this->values['162'] = new PBBool(); $this->values['162']->value = false; $this->fields['180'] = 'PBString'; $this->values['180'] = ''; $this->fields['181'] = 'PBString'; $this->values['181'] = ''; $this->fields['182'] = 'PBInt'; $this->values['182'] = ''; $this->fields['183'] = 'ActionChainSMSStatus'; $this->values['183'] = ''; $this->fields['200'] = 'PBInt'; $this->values['200'] = ''; $this->fields['201'] = 'PBInt'; $this->values['201'] = ''; $this->fields['220'] = 'PBString'; $this->values['220'] = ''; $this->fields['223'] = 'PBBool'; $this->values['223'] = ''; $this->fields['225'] = 'PBBool'; $this->values['225'] = ''; $this->fields['226'] = 'PBBool'; $this->values['226'] = ''; $this->fields['227'] = 'PBBool'; $this->values['227'] = ''; $this->fields['241'] = 'PBString'; $this->values['241'] = ''; $this->fields['242'] = 'PBString'; $this->values['242'] = ''; $this->fields['260'] = 'PBBool'; $this->values['260'] = ''; $this->fields['280'] = 'PBString'; $this->values['280'] = ''; $this->fields['281'] = 'PBString'; $this->values['281'] = ''; $this->fields['300'] = 'PBBool'; $this->values['300'] = ''; $this->fields['320'] = 'PBString'; $this->values['320'] = ''; $this->fields['340'] = 'PBInt'; $this->values['340'] = ''; $this->fields['360'] = 'PBString'; $this->values['360'] = ''; }
public function __construct($reader = null) { parent::__construct($reader); self::$fields["Test"]["2"] = "PBString"; $this->values["2"] = array(); self::$fieldNames["Test"]["2"] = "person"; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "PBInt"; $this->values["1"] = ""; $this->fields["2"] = "PBString"; $this->values["2"] = ""; $this->fields["3"] = "PBInt"; $this->values["3"] = array(); $this->fields["4"] = "PBInt"; $this->values["4"] = ""; $this->fields["5"] = "PBInt"; $this->values["5"] = ""; $this->fields["6"] = "PBString"; $this->values["6"] = ""; $this->fields["7"] = "Activity"; $this->values["7"] = array(); }
/** * 调用后台接口 * @param PBMessage $pb_obj * @param PBMessage $ret_obj * @return bool */ public static function request(PBMessage $pb_obj, PBMessage $ret_obj, &$result_code = '', &$result_info = '', &$potalseq = '', &$card_info = array()) { if (!isset($pb_obj->name)) { return FALSE; } // serialize $string = pack('a20nn', $pb_obj->name, 0, 1) . $pb_obj->SerializeToString(); $pkg = pack('N', strlen($string)) . $string; if (empty(static::$dns_object) or !isset(static::$dns_object->ip) or !isset(static::$dns_object->port)) { static::log_buy_info("DNS解析出错"); return FALSE; } //建立TCP连接 $client = new TP_NetClient_TCP(); if (@$client->connect(static::$dns_object->ip, static::$dns_object->port, self::PORTAL_TIMEOUT)) { $client->send($pkg); //发包 $ret = @$client->recv(); //收包 } else { static::log_buy_info("建立TCP连接出错"); return FALSE; } $arr = @unpack('Nlen/a20name/ncode/nver', substr($ret, 0, 28)); if (!isset($arr) or $arr['len'] <= 0) { static::log_buy_info("解析回包错误"); return FALSE; } $data = substr($ret, 28, $arr['len']); $ret_obj->parseFromString($data); $potalseq = $ret_obj->head()->PortalSeq(); //如果请求为pay if ($pb_obj->head()->CmdCode() == 'PAY') { $a = $ret_obj->product(); if (empty($a)) { static::log_buy_info("payans 中的product数据为空!\n "); } else { //$card_no = $ret_obj->product()->productparamlist('CardIdList'); //$card_no = $ret_obj->product()->productparamlist(1)->value(); for ($i = 0; $i < $ret_obj->product()->productparamlist_size(); $i++) { $key = $ret_obj->product()->productparamlist($i)->key(); if ($key == 'CardIdList') { $card_info['card_no'] = $ret_obj->product()->productparamlist($i)->value(); static::log_buy_info("card_no信息:" . $card_info['card_no']); break; } } $point = $ret_obj->product()->storagelistpoint(); if ($ret_obj->product()->storageinfolist_size() > 0) { $card_info['storage_type'] = $ret_obj->product()->storageinfolist($point)->storagetype(); static::log_buy_info("storagetype 信息:" . $card_info['storage_type']); } } } //请求失败 if ($ret_obj->head()->CmdCode() != $pb_obj->head()->CmdCode() or $ret_obj->head()->ResultCode() != 0) { $result_code = $ret_obj->head()->ResultCode(); $result_info = $ret_obj->head()->ResultInfo(); //static::log_buy_info("\nResultCode:".$ret_obj->head()->ResultCode()."|Errorcode:".$ret_obj->head()->Errorcode()."|Errinfo:".$ret_obj->head()->Errinfo()); //echo '<pre>', $ret_obj->head()->ResultCode(), "\n", $ret_obj->head()->Errorcode(), "\n", $ret_obj->head()->Errinfo(); return FALSE; } return TRUE; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields = array(1 => 'ServiceHead', 2 => 'ClientList', 3 => 'PBString'); $this->values = array(1 => '', 2 => '', 3 => ''); }
public function __construct($reader = null) { parent::__construct($reader); self::$fields["AddressBook"]["1"] = "Person"; $this->values["1"] = array(); self::$fieldNames["AddressBook"]["1"] = "person"; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields[1] = "\\I_PBEnum"; $this->values[1] = null; $this->fields[2] = "\\I_PBInt"; $this->values[2] = null; $this->fields[3] = "\\r\\pb\\Datum"; $this->values[3] = array(); $this->fields[4] = "\\r\\pb\\Backtrace"; $this->values[4] = null; }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "Person"; $this->values["1"] = array(); }
public function __construct($reader = null) { parent::__construct($reader); $this->fields["1"] = "\\I_PBEnum"; $this->values["1"] = ""; $this->fields["2"] = "\\I_PBInt"; $this->values["2"] = ""; $this->fields["3"] = "\\r\\pb\\Datum"; $this->values["3"] = array(); $this->fields["4"] = "\\r\\pb\\Backtrace"; $this->values["4"] = ""; }