當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ExtensionFieldMap::writeTo方法代碼示例

本文整理匯總了PHP中Protobuf\Extension\ExtensionFieldMap::writeTo方法的典型用法代碼示例。如果您正苦於以下問題:PHP ExtensionFieldMap::writeTo方法的具體用法?PHP ExtensionFieldMap::writeTo怎麽用?PHP ExtensionFieldMap::writeTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Protobuf\Extension\ExtensionFieldMap的用法示例。


在下文中一共展示了ExtensionFieldMap::writeTo方法的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->platform !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->platform->value());
     }
     if ($this->device_manufacturer !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->device_manufacturer);
     }
     if ($this->device_model !== null) {
         $writer->writeVarint($stream, 26);
         $writer->writeString($stream, $this->device_model);
     }
     if ($this->locale !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->locale);
     }
     if ($this->app_version !== null) {
         $writer->writeVarint($stream, 40);
         $writer->writeVarint($stream, $this->app_version);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:33,代碼來源:DownloadRemoteConfigVersionMessage.php

示例3: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->success !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeBool($stream, $this->success);
     }
     if ($this->awarded_badges !== null) {
         foreach ($this->awarded_badges as $val) {
             $writer->writeVarint($stream, 16);
             $writer->writeVarint($stream, $val->value());
         }
     }
     if ($this->awarded_badge_levels !== null) {
         foreach ($this->awarded_badge_levels as $val) {
             $writer->writeVarint($stream, 24);
             $writer->writeVarint($stream, $val);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:29,代碼來源:CheckAwardedBadgesResponse.php

示例4: 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

示例5: 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

示例6: 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

示例7: 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->pokemon_id !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->pokemon_id->value());
     }
     if ($this->combat_points !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->combat_points);
     }
     if ($this->pokemon_data_id !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeFixed64($stream, $this->pokemon_data_id);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:29,代碼來源:CatchPokemonLogEntry.php

示例8: 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->start_time !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->start_time);
     }
     if ($this->badges !== null) {
         foreach ($this->badges as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:28,代碼來源:GetPlayerProfileResponse.php

示例9: 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->distance_in_meters !== null) {
         $writer->writeVarint($stream, 21);
         $writer->writeFloat($stream, $this->distance_in_meters);
     }
     if ($this->encounter_id !== null) {
         $writer->writeVarint($stream, 25);
         $writer->writeFixed64($stream, $this->encounter_id);
     }
     if ($this->fort_id !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->fort_id);
     }
     if ($this->fort_image_url !== null) {
         $writer->writeVarint($stream, 42);
         $writer->writeString($stream, $this->fort_image_url);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:33,代碼來源:NearbyPokemon.php

示例10: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->codename !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->codename);
     }
     if ($this->user_message !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->user_message);
     }
     if ($this->is_assignable !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeBool($stream, $this->is_assignable);
     }
     if ($this->status !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->status->value());
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:29,代碼來源:CheckCodenameAvailableResponse.php

示例11: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->interaction_range_meters !== null) {
         $writer->writeVarint($stream, 9);
         $writer->writeDouble($stream, $this->interaction_range_meters);
     }
     if ($this->max_total_deployed_pokemon !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->max_total_deployed_pokemon);
     }
     if ($this->max_player_deployed_pokemon !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->max_player_deployed_pokemon);
     }
     if ($this->deploy_stamina_multiplier !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeDouble($stream, $this->deploy_stamina_multiplier);
     }
     if ($this->deploy_attack_multiplier !== null) {
         $writer->writeVarint($stream, 41);
         $writer->writeDouble($stream, $this->deploy_attack_multiplier);
     }
     if ($this->far_interaction_range_meters !== null) {
         $writer->writeVarint($stream, 49);
         $writer->writeDouble($stream, $this->far_interaction_range_meters);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:37,代碼來源:FortSettings.php

示例12: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->disk_radius_m !== null) {
         $writer->writeVarint($stream, 13);
         $writer->writeFloat($stream, $this->disk_radius_m);
     }
     if ($this->cylinder_radius_m !== null) {
         $writer->writeVarint($stream, 21);
         $writer->writeFloat($stream, $this->cylinder_radius_m);
     }
     if ($this->cylinder_height_m !== null) {
         $writer->writeVarint($stream, 29);
         $writer->writeFloat($stream, $this->cylinder_height_m);
     }
     if ($this->cylinder_ground_m !== null) {
         $writer->writeVarint($stream, 37);
         $writer->writeFloat($stream, $this->cylinder_ground_m);
     }
     if ($this->shoulder_mode_scale !== null) {
         $writer->writeVarint($stream, 45);
         $writer->writeFloat($stream, $this->shoulder_mode_scale);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:33,代碼來源:CameraAttributes.php

示例13: 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->value !== null) {
         foreach ($this->value as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     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,代碼行數:29,代碼來源:EnumDescriptorProto.php

示例14: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->equip_badge_cooldown_ms !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->equip_badge_cooldown_ms);
     }
     if ($this->catch_probability_bonus !== null) {
         foreach ($this->catch_probability_bonus as $val) {
             $writer->writeVarint($stream, 21);
             $writer->writeFloat($stream, $val);
         }
     }
     if ($this->flee_probability_bonus !== null) {
         foreach ($this->flee_probability_bonus as $val) {
             $writer->writeVarint($stream, 29);
             $writer->writeFloat($stream, $val);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:29,代碼來源:EquippedBadgeSettings.php

示例15: writeTo

 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->gym_state !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeVarint($stream, $this->gym_state->serializedSize($sizeContext));
         $this->gym_state->writeTo($context);
     }
     if ($this->name !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->name);
     }
     if ($this->urls !== null) {
         foreach ($this->urls as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->result !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->result->value());
     }
     if ($this->description !== null) {
         $writer->writeVarint($stream, 42);
         $writer->writeString($stream, $this->description);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
開發者ID:jaspervdm,項目名稱:pogoprotos-php,代碼行數:36,代碼來源:GetGymDetailsResponse.php


注:本文中的Protobuf\Extension\ExtensionFieldMap::writeTo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。