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::I32) { $xfer += $input->readI32($this->pid); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->folder); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->site); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::STRING) { $xfer += $input->readString($this->password); } else { $xfer += $input->skip($ftype); } break; case 6: if ($ftype == TType::I32) { $xfer += $input->readI32($this->dest); } else { $xfer += $input->skip($ftype); } break; case 7: if ($ftype == TType::I16) { $xfer += $input->readI16($this->order); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::BYTE) { $xfer += $input->readByte($this->priority); } else { $xfer += $input->skip($ftype); } break; case 9: if ($ftype == TType::LST) { $this->links = array(); $_size7 = 0; $_etype10 = 0; $xfer += $input->readListBegin($_etype10, $_size7); for ($_i11 = 0; $_i11 < $_size7; ++$_i11) { $elem12 = null; $elem12 = new FileData(); $xfer += $elem12->read($input); $this->links[] = $elem12; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }