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->freshUsers = array(); $_size50 = 0; $_etype53 = 0; $xfer += $input->readListBegin($_etype53, $_size50); for ($_i54 = 0; $_i54 < $_size50; ++$_i54) { $elem55 = null; $elem55 = new \RedRoma\Aroma\User(); $xfer += $elem55->read($input); $this->freshUsers[] = $elem55; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::LST) { $this->freshApplications = array(); $_size56 = 0; $_etype59 = 0; $xfer += $input->readListBegin($_etype59, $_size56); for ($_i60 = 0; $_i60 < $_size56; ++$_i60) { $elem61 = null; $elem61 = new \RedRoma\Aroma\Application(); $xfer += $elem61->read($input); $this->freshApplications[] = $elem61; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::LST) { $this->failedHealthChecks = array(); $_size62 = 0; $_etype65 = 0; $xfer += $input->readListBegin($_etype65, $_size62); for ($_i66 = 0; $_i66 < $_size62; ++$_i66) { $elem67 = null; $elem67 = new \RedRoma\Aroma\Events\HealthCheckFailed(); $xfer += $elem67->read($input); $this->failedHealthChecks[] = $elem67; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::LST) { $this->generalEvents = array(); $_size68 = 0; $_etype71 = 0; $xfer += $input->readListBegin($_etype71, $_size68); for ($_i72 = 0; $_i72 < $_size68; ++$_i72) { $elem73 = null; $elem73 = new \RedRoma\Aroma\Events\Event(); $xfer += $elem73->read($input); $this->generalEvents[] = $elem73; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }
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::STRUCT) { $this->token = new \RedRoma\Aroma\Authentication\AuthenticationToken(); $xfer += $this->token->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRUCT) { $this->event = new \RedRoma\Aroma\Events\Event(); $xfer += $this->event->read($input); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::MAP) { $this->channels = array(); $_size0 = 0; $_ktype1 = 0; $_vtype2 = 0; $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0); for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { $key5 = new \RedRoma\Aroma\Channels\AromaChannel(); $val6 = new \RedRoma\Aroma\User(); $key5 = new \RedRoma\Aroma\Channels\AromaChannel(); $xfer += $key5->read($input); $val6 = new \RedRoma\Aroma\User(); $xfer += $val6->read($input); $this->channels[$key5] = $val6; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }