Ejemplo n.º 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();
                     $_size14 = 0;
                     $_etype17 = 0;
                     $xfer += $input->readListBegin($_etype17, $_size14);
                     for ($_i18 = 0; $_i18 < $_size14; ++$_i18) {
                         $elem19 = null;
                         $elem19 = new vng_zingme_payment_thrift_T_AppInfo();
                         $xfer += $elem19->read($input);
                         $this->success[] = $elem19;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Ejemplo n.º 2
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'appID', 'type' => TType::STRING), 2 => array('var' => 'appName', 'type' => TType::STRING), 3 => array('var' => 'appDes', 'type' => TType::STRING), 4 => array('var' => 'appURL', 'type' => TType::STRING), 5 => array('var' => 'iconPath', 'type' => TType::STRING), 6 => array('var' => 'restURL', 'type' => TType::STRING), 7 => array('var' => 'key1', 'type' => TType::STRING), 8 => array('var' => 'key2', 'type' => TType::STRING), 9 => array('var' => 'isEnabled', 'type' => TType::BYTE));
     }
     if (is_array($vals)) {
         if (isset($vals['appID'])) {
             $this->appID = $vals['appID'];
         }
         if (isset($vals['appName'])) {
             $this->appName = $vals['appName'];
         }
         if (isset($vals['appDes'])) {
             $this->appDes = $vals['appDes'];
         }
         if (isset($vals['appURL'])) {
             $this->appURL = $vals['appURL'];
         }
         if (isset($vals['iconPath'])) {
             $this->iconPath = $vals['iconPath'];
         }
         if (isset($vals['restURL'])) {
             $this->restURL = $vals['restURL'];
         }
         if (isset($vals['key1'])) {
             $this->key1 = $vals['key1'];
         }
         if (isset($vals['key2'])) {
             $this->key2 = $vals['key2'];
         }
         if (isset($vals['isEnabled'])) {
             $this->isEnabled = $vals['isEnabled'];
         }
     }
 }