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::MAP) {
                     $this->success = array();
                     $_size319 = 0;
                     $_ktype320 = 0;
                     $_vtype321 = 0;
                     $xfer += $input->readMapBegin($_ktype320, $_vtype321, $_size319);
                     for ($_i323 = 0; $_i323 < $_size319; ++$_i323) {
                         $key324 = '';
                         $val325 = new \com\boxalino\dataintelligence\api\thrift\DataSource();
                         $xfer += $input->readString($key324);
                         $val325 = new \com\boxalino\dataintelligence\api\thrift\DataSource();
                         $xfer += $val325->read($input);
                         $this->success[$key324] = $val325;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->e = new \com\boxalino\dataintelligence\api\thrift\DataIntelligenceServiceException();
                     $xfer += $this->e->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
コード例 #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::STRING) {
                     $xfer += $input->readString($this->processTaskId);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::LST) {
                     $this->inputs = array();
                     $_size9 = 0;
                     $_etype12 = 0;
                     $xfer += $input->readListBegin($_etype12, $_size9);
                     for ($_i13 = 0; $_i13 < $_size9; ++$_i13) {
                         $elem14 = null;
                         $elem14 = new \com\boxalino\dataintelligence\api\thrift\DataSource();
                         $xfer += $elem14->read($input);
                         $this->inputs[] = $elem14;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::LST) {
                     $this->outputs = array();
                     $_size15 = 0;
                     $_etype18 = 0;
                     $xfer += $input->readListBegin($_etype18, $_size15);
                     for ($_i19 = 0; $_i19 < $_size15; ++$_i19) {
                         $elem20 = null;
                         $elem20 = new \com\boxalino\dataintelligence\api\thrift\DataExport();
                         $xfer += $elem20->read($input);
                         $this->outputs[] = $elem20;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->dev);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->delta);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }