Esempio n. 1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'userId', 'type' => TType::I32), 2 => array('var' => 'systemId', 'type' => TType::I16), 3 => array('var' => 'appId', 'type' => TType::I16), 4 => array('var' => 'vipId', 'type' => TType::I32), 5 => array('var' => 'type', 'type' => TType::BYTE));
     }
     if (is_array($vals)) {
         if (isset($vals['userId'])) {
             $this->userId = $vals['userId'];
         }
         if (isset($vals['systemId'])) {
             $this->systemId = $vals['systemId'];
         }
         if (isset($vals['appId'])) {
             $this->appId = $vals['appId'];
         }
         if (isset($vals['vipId'])) {
             $this->vipId = $vals['vipId'];
         }
         if (isset($vals['type'])) {
             $this->type = $vals['type'];
         }
     }
 }
 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 1:
                 if ($ftype == TType::LST) {
                     $this->logs = array();
                     $_size14 = 0;
                     $_etype17 = 0;
                     $xfer += $input->readListBegin($_etype17, $_size14);
                     for ($_i18 = 0; $_i18 < $_size14; ++$_i18) {
                         $elem19 = null;
                         $elem19 = new logcommentfilter_ZLog();
                         $xfer += $elem19->read($input);
                         $this->logs[] = $elem19;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }