当前位置: 首页>>代码示例>>PHP>>正文


PHP WriteContext::getStream方法代码示例

本文整理汇总了PHP中Protobuf\WriteContext::getStream方法的典型用法代码示例。如果您正苦于以下问题:PHP WriteContext::getStream方法的具体用法?PHP WriteContext::getStream怎么用?PHP WriteContext::getStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Protobuf\WriteContext的用法示例。


在下文中一共展示了WriteContext::getStream方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:13,代码来源:EchoMessage.php

示例2: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->item_id !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->item_id->value());
     }
     if ($this->pokemon_id !== null) {
         $writer->writeVarint($stream, 17);
         $writer->writeFixed64($stream, $this->pokemon_id);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:21,代码来源:UseItemReviveMessage.php

示例3: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->incense_type !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->incense_type->value());
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:17,代码来源:UseIncenseMessage.php

示例4: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->fort_id !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->fort_id);
     }
     if ($this->team_color !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->team_color->value());
     }
     if ($this->pokemon_data !== null) {
         $writer->writeVarint($stream, 26);
         $writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext));
         $this->pokemon_data->writeTo($context);
     }
     if ($this->name !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->name);
     }
     if ($this->image_urls !== null) {
         foreach ($this->image_urls as $val) {
             $writer->writeVarint($stream, 42);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->fp !== null) {
         $writer->writeVarint($stream, 48);
         $writer->writeVarint($stream, $this->fp);
     }
     if ($this->stamina !== null) {
         $writer->writeVarint($stream, 56);
         $writer->writeVarint($stream, $this->stamina);
     }
     if ($this->max_stamina !== null) {
         $writer->writeVarint($stream, 64);
         $writer->writeVarint($stream, $this->max_stamina);
     }
     if ($this->type !== null) {
         $writer->writeVarint($stream, 72);
         $writer->writeVarint($stream, $this->type->value());
     }
     if ($this->latitude !== null) {
         $writer->writeVarint($stream, 81);
         $writer->writeDouble($stream, $this->latitude);
     }
     if ($this->longitude !== null) {
         $writer->writeVarint($stream, 89);
         $writer->writeDouble($stream, $this->longitude);
     }
     if ($this->description !== null) {
         $writer->writeVarint($stream, 98);
         $writer->writeString($stream, $this->description);
     }
     if ($this->modifiers !== null) {
         foreach ($this->modifiers as $val) {
             $writer->writeVarint($stream, 106);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:71,代码来源:FortDetailsResponse.php

示例5: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->result !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->result->value());
     }
     if ($this->log_entries !== null) {
         foreach ($this->log_entries as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:24,代码来源:SfidaActionLogResponse.php

示例6: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->fort_id !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->fort_id);
     }
     if ($this->encounter_id !== null) {
         $writer->writeVarint($stream, 17);
         $writer->writeFixed64($stream, $this->encounter_id);
     }
     if ($this->active_pokemon_id !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->active_pokemon_id->value());
     }
     if ($this->lure_expires_timestamp_ms !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->lure_expires_timestamp_ms);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:29,代码来源:FortLureInfo.php

示例7: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->encounter_id !== null) {
         $writer->writeVarint($stream, 9);
         $writer->writeFixed64($stream, $this->encounter_id);
     }
     if ($this->spawn_point_id !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->spawn_point_id);
     }
     if ($this->player_latitude !== null) {
         $writer->writeVarint($stream, 25);
         $writer->writeDouble($stream, $this->player_latitude);
     }
     if ($this->player_longitude !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeDouble($stream, $this->player_longitude);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:29,代码来源:EncounterMessage.php

示例8: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->pokemon_id !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->pokemon_id->value());
     }
     if ($this->times_encountered !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->times_encountered);
     }
     if ($this->times_captured !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->times_captured);
     }
     if ($this->evolution_stone_pieces !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->evolution_stone_pieces);
     }
     if ($this->evolution_stones !== null) {
         $writer->writeVarint($stream, 40);
         $writer->writeVarint($stream, $this->evolution_stones);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:33,代码来源:PokedexEntry.php

示例9: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->spawn_point_id !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->spawn_point_id);
     }
     if ($this->encounter_id !== null) {
         $writer->writeVarint($stream, 17);
         $writer->writeFixed64($stream, $this->encounter_id);
     }
     if ($this->pokemon_id !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->pokemon_id->value());
     }
     if ($this->expiration_timestamp_ms !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->expiration_timestamp_ms);
     }
     if ($this->latitude !== null) {
         $writer->writeVarint($stream, 41);
         $writer->writeDouble($stream, $this->latitude);
     }
     if ($this->longitude !== null) {
         $writer->writeVarint($stream, 49);
         $writer->writeDouble($stream, $this->longitude);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:37,代码来源:MapPokemon.php

示例10: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->daily_bonus_coins !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->daily_bonus_coins);
     }
     if ($this->daily_defender_bonus_per_pokemon !== null) {
         foreach ($this->daily_defender_bonus_per_pokemon as $val) {
             $writer->writeVarint($stream, 16);
             $writer->writeVarint($stream, $val);
         }
     }
     if ($this->daily_defender_bonus_max_defenders !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->daily_defender_bonus_max_defenders);
     }
     if ($this->daily_defender_bonus_currency !== null) {
         foreach ($this->daily_defender_bonus_currency as $val) {
             $writer->writeVarint($stream, 34);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->min_time_between_claims_ms !== null) {
         $writer->writeVarint($stream, 40);
         $writer->writeVarint($stream, $this->min_time_between_claims_ms);
     }
     if ($this->daily_bonus_enabled !== null) {
         $writer->writeVarint($stream, 48);
         $writer->writeBool($stream, $this->daily_bonus_enabled);
     }
     if ($this->daily_defender_bonus_enabled !== null) {
         $writer->writeVarint($stream, 56);
         $writer->writeBool($stream, $this->daily_defender_bonus_enabled);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:45,代码来源:IapSettings.php

示例11: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->max_pokemon !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->max_pokemon);
     }
     if ($this->max_bag_items !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->max_bag_items);
     }
     if ($this->base_pokemon !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->base_pokemon);
     }
     if ($this->base_bag_items !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->base_bag_items);
     }
     if ($this->base_eggs !== null) {
         $writer->writeVarint($stream, 40);
         $writer->writeVarint($stream, $this->base_eggs);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:33,代码来源:InventorySettings.php

示例12: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->name_part === null) {
         throw new \UnexpectedValueException('Field "\\google\\protobuf\\UninterpretedOption\\NamePart#name_part" (tag 1) is required but has no value.');
     }
     if ($this->is_extension === null) {
         throw new \UnexpectedValueException('Field "\\google\\protobuf\\UninterpretedOption\\NamePart#is_extension" (tag 2) is required but has no value.');
     }
     if ($this->name_part !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->name_part);
     }
     if ($this->is_extension !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeBool($stream, $this->is_extension);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:protobuf-php,项目名称:google-protobuf-proto,代码行数:27,代码来源:NamePart.php

示例13: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->active_pokemon !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeVarint($stream, $this->active_pokemon->serializedSize($sizeContext));
         $this->active_pokemon->writeTo($context);
     }
     if ($this->trainer_public_profile !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeVarint($stream, $this->trainer_public_profile->serializedSize($sizeContext));
         $this->trainer_public_profile->writeTo($context);
     }
     if ($this->reverse_pokemon !== null) {
         foreach ($this->reverse_pokemon as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->defeated_pokemon !== null) {
         foreach ($this->defeated_pokemon as $val) {
             $writer->writeVarint($stream, 34);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:37,代码来源:BattleParticipant.php

示例14: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->name !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->name);
     }
     if ($this->number !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->number);
     }
     if ($this->options !== null) {
         $writer->writeVarint($stream, 26);
         $writer->writeVarint($stream, $this->options->serializedSize($sizeContext));
         $this->options->writeTo($context);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:protobuf-php,项目名称:google-protobuf-proto,代码行数:26,代码来源:EnumValueDescriptorProto.php

示例15: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->contact_settings !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeVarint($stream, $this->contact_settings->serializedSize($sizeContext));
         $this->contact_settings->writeTo($context);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:18,代码来源:SetContactSettingsMessage.php


注:本文中的Protobuf\WriteContext::getStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。