Esempio 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();
                     $_size7 = 0;
                     $_etype10 = 0;
                     $xfer += $input->readListBegin($_etype10, $_size7);
                     for ($_i11 = 0; $_i11 < $_size7; ++$_i11) {
                         $elem12 = null;
                         $elem12 = new contentfilter_ContentFilterData();
                         $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;
 }
Esempio n. 2
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 1:
                 if ($ftype == TType::LST) {
                     $this->resultList = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $elem5 = new contentfilter_ContentFilterData();
                         $xfer += $elem5->read($input);
                         $this->resultList[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I16) {
                     $xfer += $input->readI16($this->totalRecord);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }