Example #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 1:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->is_empty);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->id);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->is_scan);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->is_error);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->error);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->error_msg);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::LST) {
                     $this->cells = array();
                     $_size28 = 0;
                     $_etype31 = 0;
                     $xfer += $input->readListBegin($_etype31, $_size28);
                     for ($_i32 = 0; $_i32 < $_size28; ++$_i32) {
                         $elem33 = null;
                         $elem33 = new \Hypertable_ThriftGen\Cell();
                         $xfer += $elem33->read($input);
                         $this->cells[] = $elem33;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Example #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->results = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $xfer += $input->readString($elem5);
                         $this->results[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::LST) {
                     $this->cells = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $elem11 = new \Hypertable_ThriftGen\Cell();
                         $xfer += $elem11->read($input);
                         $this->cells[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->scanner);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->mutator);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }