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::LST) {
                     $this->messages = array();
                     $_size7 = 0;
                     $_etype10 = 0;
                     $xfer += $input->readListBegin($_etype10, $_size7);
                     for ($_i11 = 0; $_i11 < $_size7; ++$_i11) {
                         $elem12 = null;
                         $elem12 = new LogEntry();
                         $xfer += $elem12->read($input);
                         $this->messages[] = $elem12;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }