public function read($input) { $xfer = 0; $fname = null; $ftype = 0; $fid = 0; $xfer += $input->readStructBegin($fname); while (true) { $xfer += $input->readFieldBegin($fname, $ftype, $fid); if ($ftype == TType::STOP) { break; } switch ($fid) { case 0: if ($ftype == TType::LST) { $this->success = array(); $_size28 = 0; $_etype31 = 0; $xfer += $input->readListBegin($_etype31, $_size28); for ($_i32 = 0; $_i32 < $_size28; ++$_i32) { $elem33 = null; $elem33 = new vng_zingme_payment_thrift_T_Account(); $xfer += $elem33->read($input); $this->success[] = $elem33; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }
public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'userID', 'type' => TType::I32), 2 => array('var' => 'currentBalance', 'type' => TType::DOUBLE), 3 => array('var' => 'amount', 'type' => TType::DOUBLE), 4 => array('var' => 'txID', 'type' => TType::I64), 5 => array('var' => 'txType', 'type' => TType::I16), 6 => array('var' => 'agentID', 'type' => TType::STRING)); } if (is_array($vals)) { if (isset($vals['userID'])) { $this->userID = $vals['userID']; } if (isset($vals['currentBalance'])) { $this->currentBalance = $vals['currentBalance']; } if (isset($vals['amount'])) { $this->amount = $vals['amount']; } if (isset($vals['txID'])) { $this->txID = $vals['txID']; } if (isset($vals['txType'])) { $this->txType = $vals['txType']; } if (isset($vals['agentID'])) { $this->agentID = $vals['agentID']; } } }