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(); $_size166 = 0; $_etype169 = 0; $xfer += $input->readListBegin($_etype169, $_size166); for ($_i170 = 0; $_i170 < $_size166; ++$_i170) { $elem171 = null; $elem171 = new \THRegionLocation(); $xfer += $elem171->read($input); $this->success[] = $elem171; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { $this->io = new \TIOError(); $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; }
public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'serverName', 'type' => TType::STRUCT, 'class' => '\\TServerName'), 2 => array('var' => 'regionInfo', 'type' => TType::STRUCT, 'class' => '\\THRegionInfo')); } if (is_array($vals)) { if (isset($vals['serverName'])) { $this->serverName = $vals['serverName']; } if (isset($vals['regionInfo'])) { $this->regionInfo = $vals['regionInfo']; } } }