add() public method

Adds an element to set.
public add ( Unknown $unknown )
$unknown Unknown
コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->asset_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->bundle_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->version = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 7);
             $this->checksum = $reader->readFixed32($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->size = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->key = $reader->readByteStream($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->incense_type = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Player\PlayerPublicProfile();
             $this->trainer_public_profile = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->training_pokemon = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Map\Pokemon\WildPokemon();
             $this->wild_pokemon = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->background = \POGOProtos\Networking\Responses\EncounterResponse\Background::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->status = \POGOProtos\Networking\Responses\EncounterResponse\Status::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Capture\CaptureProbability();
             $this->capture_probability = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->spawn_point_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->expiration_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->longitude = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->interaction_range_meters = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_total_deployed_pokemon = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_player_deployed_pokemon = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->deploy_stamina_multiplier = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->deploy_attack_multiplier = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->far_interaction_range_meters = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #7
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->codename = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->user_message = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->is_assignable = $reader->readBool($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->status = \POGOProtos\Networking\Responses\ClaimCodenameResponse\Status::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PlayerData();
             $this->updated_player = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #8
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\CollectDailyDefenderBonusResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->currency_type === null) {
                 $this->currency_type = new \Protobuf\ScalarCollection();
             }
             $this->currency_type->add($reader->readString($stream));
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->currency_awarded === null) {
                 $this->currency_awarded = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->currency_awarded->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->defenders_count = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #9
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\LevelUpRewardsResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\Item\ItemAward();
             if ($this->items_awarded === null) {
                 $this->items_awarded = new \Protobuf\MessageCollection();
             }
             $this->items_awarded->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->items_unlocked === null) {
                 $this->items_unlocked = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->items_unlocked->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #10
0
ファイル: GymState.php プロジェクト: jaspervdm/pogoprotos-php
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Map\Fort\FortData();
             $this->fort_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Gym\GymMembership();
             if ($this->memberships === null) {
                 $this->memberships = new \Protobuf\MessageCollection();
             }
             $this->memberships->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->deploy_lockout = $reader->readBool($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #11
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Data\Logs\FortSearchLogEntry\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->fort_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\Item\ItemData();
             if ($this->items === null) {
                 $this->items = new \Protobuf\MessageCollection();
             }
             $this->items->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->eggs = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #12
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\EnumValueDescriptorProto();
             if ($this->value === null) {
                 $this->value = new \Protobuf\MessageCollection();
             }
             $this->value->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\EnumOptions();
             $this->options = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #13
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->pokeball_type === null) {
                 $this->pokeball_type = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->pokeball_type->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->capture_probability === null) {
                 $this->capture_probability = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->capture_probability->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->reticle_difficulty_scale = $reader->readDouble($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #14
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->success = $reader->readBool($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badges === null) {
                 $this->awarded_badges = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badges->add(\POGOProtos\Enums\BadgeType::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badge_levels === null) {
                 $this->awarded_badge_levels = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badge_levels->add($reader->readVarint($stream));
             }
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #15
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->equip_badge_cooldown_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->catch_probability_bonus === null) {
                 $this->catch_probability_bonus = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->catch_probability_bonus->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->flee_probability_bonus === null) {
                 $this->flee_probability_bonus = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->flee_probability_bonus->add($reader->readFloat($stream));
             }
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #16
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->disk_radius_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->cylinder_radius_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->cylinder_height_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->cylinder_ground_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->shoulder_mode_scale = $reader->readFloat($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #17
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->modified_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\InventoryItem\DeletedItem();
             $this->deleted_item = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\InventoryItemData();
             $this->inventory_item_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #18
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\EvolvePokemonResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->evolved_pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->experience_awarded = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->candy_awarded = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #19
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->platform = \POGOProtos\Enums\Platform::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_manufacturer = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->locale = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 13);
             $this->app_version = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #20
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->spin_bonus_threshold = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->excellent_throw_threshold = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->great_throw_threshold = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->nice_throw_threshold = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->milestone_threshold = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #21
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->success = $reader->readBool($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Networking\Responses\DownloadItemTemplatesResponse\ItemTemplate();
             if ($this->item_templates === null) {
                 $this->item_templates = new \Protobuf\MessageCollection();
             }
             $this->item_templates->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #22
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Data\Logs\CatchPokemonLogEntry\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->combat_points = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->pokemon_data_id = $reader->readFixed64($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #23
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->driving_warning_speed_meters_per_second = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->driving_warning_cooldown_minutes = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->driving_speed_sample_interval_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->driving_speed_sample_count = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #24
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->base_stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->base_attack = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->base_defense = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->dodge_energy_delta = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #25
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->quest_type = \POGOProtos\Enums\QuestType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Quest\DailyQuestSettings();
             $this->daily_quest = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #26
0
ファイル: AuthInfo.php プロジェクト: jaspervdm/pogoprotos-php
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->provider = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Networking\Envelopes\RequestEnvelope\AuthInfo\JWT();
             $this->token = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #27
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->result = \POGOProtos\Networking\Responses\DownloadRemoteConfigVersionResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->item_templates_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->asset_digest_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #28
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->modifier_lifetime_seconds = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->troy_disk_num_pokemon_spawned = $reader->readVarint($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #29
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->start_time_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->unknown_status = $reader->readBool($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->walking = $reader->readBool($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->running = $reader->readBool($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->stationary = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->automotive = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->tilting = $reader->readBool($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->cycling = $reader->readBool($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->status = $reader->readByteStream($stream);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }
コード例 #30
0
 /**
  * {@inheritdoc}
  */
 public function readFrom(\Protobuf\ReadContext $context)
 {
     $reader = $context->getReader();
     $length = $context->getLength();
     $stream = $context->getStream();
     $limit = $length !== null ? $stream->tell() + $length : null;
     while ($limit === null || $stream->tell() < $limit) {
         if ($stream->eof()) {
             break;
         }
         $key = $reader->readVarint($stream);
         $wire = \Protobuf\WireFormat::getTagWireType($key);
         $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
         if ($stream->eof()) {
             break;
         }
         if ($tag === 1) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->fort_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->team_color = \POGOProtos\Enums\TeamColor::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PokemonData();
             $this->pokemon_data = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->image_urls === null) {
                 $this->image_urls = new \Protobuf\ScalarCollection();
             }
             $this->image_urls->add($reader->readString($stream));
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->fp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->max_stamina = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->type = \POGOProtos\Map\Fort\FortType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->longitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->description = $reader->readString($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Map\Fort\FortModifier();
             if ($this->modifiers === null) {
                 $this->modifiers = new \Protobuf\MessageCollection();
             }
             $this->modifiers->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         $extensions = $context->getExtensionRegistry();
         $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null;
         if ($extension !== null) {
             $this->extensions()->add($extension, $extension->readFrom($context, $wire));
             continue;
         }
         if ($this->unknownFieldSet === null) {
             $this->unknownFieldSet = new \Protobuf\UnknownFieldSet();
         }
         $data = $reader->readUnknown($stream, $wire);
         $unknown = new \Protobuf\Unknown($tag, $wire, $data);
         $this->unknownFieldSet->add($unknown);
     }
 }