Beispiel #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();
                     $_size495 = 0;
                     $_etype498 = 0;
                     $xfer += $input->readListBegin($_etype498, $_size495);
                     for ($_i499 = 0; $_i499 < $_size495; ++$_i499) {
                         $elem500 = null;
                         $elem500 = new \TCell();
                         $xfer += $elem500->read($input);
                         $this->success[] = $elem500;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->io = new \IOError();
                     $xfer += $this->io->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Beispiel #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->row);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::MAP) {
                     $this->columns = array();
                     $_size7 = 0;
                     $_ktype8 = 0;
                     $_vtype9 = 0;
                     $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7);
                     for ($_i11 = 0; $_i11 < $_size7; ++$_i11) {
                         $key12 = '';
                         $val13 = new \TCell();
                         $xfer += $input->readString($key12);
                         $val13 = new \TCell();
                         $xfer += $val13->read($input);
                         $this->columns[$key12] = $val13;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }