Exemple #1
0
 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();
                     $_size7 = 0;
                     $_etype10 = 0;
                     $xfer += $input->readListBegin($_etype10, $_size7);
                     for ($_i11 = 0; $_i11 < $_size7; ++$_i11) {
                         $elem12 = null;
                         $elem12 = new vng_zingme_payment_thrift_T_Transaction();
                         $xfer += $elem12->read($input);
                         $this->success[] = $elem12;
                     }
                     $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' => 'txID', 'type' => TType::I64), 2 => array('var' => 'txType', 'type' => TType::I16), 3 => array('var' => 'txTime', 'type' => TType::I32), 4 => array('var' => 'txLocalTime', 'type' => TType::I32), 5 => array('var' => 'userID', 'type' => TType::I32), 6 => array('var' => 'userName', 'type' => TType::STRING), 7 => array('var' => 'currentBalance', 'type' => TType::DOUBLE), 8 => array('var' => 'amount', 'type' => TType::DOUBLE), 9 => array('var' => 'agentID', 'type' => TType::STRING), 10 => array('var' => 'refID', 'type' => TType::STRING), 11 => array('var' => 'itemIDs', 'type' => TType::STRING), 12 => array('var' => 'itemNames', 'type' => TType::STRING), 13 => array('var' => 'itemPrices', 'type' => TType::STRING), 14 => array('var' => 'itemQuantities', 'type' => TType::STRING), 15 => array('var' => 'mac', 'type' => TType::STRING), 16 => array('var' => 'responseCode', 'type' => TType::I16), 17 => array('var' => 'description', 'type' => TType::STRING), 18 => array('var' => 'clientIP', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['txID'])) {
             $this->txID = $vals['txID'];
         }
         if (isset($vals['txType'])) {
             $this->txType = $vals['txType'];
         }
         if (isset($vals['txTime'])) {
             $this->txTime = $vals['txTime'];
         }
         if (isset($vals['txLocalTime'])) {
             $this->txLocalTime = $vals['txLocalTime'];
         }
         if (isset($vals['userID'])) {
             $this->userID = $vals['userID'];
         }
         if (isset($vals['userName'])) {
             $this->userName = $vals['userName'];
         }
         if (isset($vals['currentBalance'])) {
             $this->currentBalance = $vals['currentBalance'];
         }
         if (isset($vals['amount'])) {
             $this->amount = $vals['amount'];
         }
         if (isset($vals['agentID'])) {
             $this->agentID = $vals['agentID'];
         }
         if (isset($vals['refID'])) {
             $this->refID = $vals['refID'];
         }
         if (isset($vals['itemIDs'])) {
             $this->itemIDs = $vals['itemIDs'];
         }
         if (isset($vals['itemNames'])) {
             $this->itemNames = $vals['itemNames'];
         }
         if (isset($vals['itemPrices'])) {
             $this->itemPrices = $vals['itemPrices'];
         }
         if (isset($vals['itemQuantities'])) {
             $this->itemQuantities = $vals['itemQuantities'];
         }
         if (isset($vals['mac'])) {
             $this->mac = $vals['mac'];
         }
         if (isset($vals['responseCode'])) {
             $this->responseCode = $vals['responseCode'];
         }
         if (isset($vals['description'])) {
             $this->description = $vals['description'];
         }
         if (isset($vals['clientIP'])) {
             $this->clientIP = $vals['clientIP'];
         }
     }
 }