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();
                     $_size60 = 0;
                     $_etype63 = 0;
                     $xfer += $input->readListBegin($_etype63, $_size60);
                     for ($_i64 = 0; $_i64 < $_size60; ++$_i64) {
                         $elem65 = null;
                         $elem65 = new TCell();
                         $xfer += $elem65->read($input);
                         $this->success[] = $elem65;
                     }
                     $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;
 }
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::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;
 }