• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Protobuf\DescriptorProto类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Google\Protobuf\DescriptorProto的典型用法代码示例。如果您正苦于以下问题:PHP DescriptorProto类的具体用法?PHP DescriptorProto怎么用?PHP DescriptorProto使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: setupFullNameForMessage

 protected function setupFullNameForMessage(DescriptorProto $message, $package_name = "")
 {
     $new_package_name = $package_name . "." . $message->getName();
     foreach ($message->getEnumType() as $enum) {
         $this->setupFullNameForEnum($enum, $new_package_name);
     }
     foreach ($message->getNestedType() as $m) {
         $this->setupFullNameForMessage($m, $new_package_name);
     }
     $message->full_name = $package_name . "." . $message->getName();
     $message->package_name = $package_name;
     MessagePool::register($message->full_name, $message);
     if (MyHelper::IsPackageNameOverriden($this->file)) {
         foreach ($message->getField() as $field) {
             /** @var $field FieldDescriptorProto */
             if ($field->getType() == \ProtocolBuffers::TYPE_MESSAGE || $field->getType() == \ProtocolBuffers::TYPE_ENUM) {
                 $name = $field->getTypeName();
                 $package = $this->file->getPackage();
                 if ($package) {
                     $name = str_replace($package, MyHelper::getPackageName($this->file), $name);
                 } else {
                     $name = MyHelper::getPackageName($this->file) . $name;
                 }
                 $name = preg_replace("/^\\.+/", ".", $name);
                 $field->setTypeName($name);
             }
         }
     }
 }
开发者ID:melanc,项目名称:devel,代码行数:29,代码来源:Compiler.php


示例2: generateMessage

 private function generateMessage($className, DescriptorProto $message)
 {
     $file = new PhpFile();
     $class = $file->addClass($className);
     $ns = $class->getNamespace();
     $ns->addUse("Skrz\\Meta\\Protobuf\\ProtobufField", null, $protobufFieldAlias);
     if (($info = $this->getSourceCodeInfo($className)) && $info->getLeadingComments()) {
         $class->addComment(trim($info->getLeadingComments()));
     }
     $this->addAutoGeneratedWarning($class);
     foreach ((array) $message->getField() as $i => $field) {
         /** @var FieldDescriptorProto $field */
         $propertyName = lcfirst(implode("", array_map(function ($s) {
             return ucfirst($s);
         }, explode("_", $field->getName()))));
         $property = $class->addProperty($propertyName);
         $property->setVisibility("protected");
         if (($info = $this->getSourceCodeInfo($className, array_merge($this->paths[$className], [DescriptorProtoMeta::FIELD_PROTOBUF_FIELD, $i]))) && $info->getLeadingComments()) {
             $property->addComment(str_replace("*/", "* /", trim($info->getLeadingComments())));
             $property->addComment("");
         }
         switch ($field->getType()) {
             case FieldDescriptorProto\TypeEnum::TYPE_DOUBLE:
                 $wireType = WireTypeEnum::FIXED64;
                 $phpType = "float";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_FLOAT:
                 $wireType = WireTypeEnum::FIXED32;
                 $phpType = "float";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_UINT64:
             case FieldDescriptorProto\TypeEnum::TYPE_UINT32:
                 $unsigned = true;
             case FieldDescriptorProto\TypeEnum::TYPE_INT64:
             case FieldDescriptorProto\TypeEnum::TYPE_INT32:
                 $wireType = WireTypeEnum::VARINT;
                 $phpType = "int";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_FIXED64:
                 $unsigned = true;
             case FieldDescriptorProto\TypeEnum::TYPE_SFIXED64:
                 $wireType = WireTypeEnum::FIXED64;
                 $phpType = "int";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_FIXED32:
                 $unsigned = true;
             case FieldDescriptorProto\TypeEnum::TYPE_SFIXED32:
                 $wireType = WireTypeEnum::FIXED32;
                 $phpType = "int";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_BOOL:
                 $wireType = WireTypeEnum::VARINT;
                 $phpType = "bool";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_STRING:
             case FieldDescriptorProto\TypeEnum::TYPE_BYTES:
                 $wireType = WireTypeEnum::STRING;
                 $phpType = "string";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_MESSAGE:
                 $wireType = WireTypeEnum::STRING;
                 $fieldClassName = $this->convertPackageToNamespace($field->getTypeName());
                 $ns->addUse($fieldClassName, null, $phpType);
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_ENUM:
                 $wireType = WireTypeEnum::VARINT;
                 $fieldClassName = $this->convertPackageToNamespace($field->getTypeName() . "Enum");
                 $ns->addUse($fieldClassName, null, $see);
                 $phpType = "int";
                 break;
             case FieldDescriptorProto\TypeEnum::TYPE_SINT32:
             case FieldDescriptorProto\TypeEnum::TYPE_SINT64:
                 $wireType = WireTypeEnum::ZIGZAG;
                 $phpType = "int";
                 break;
             default:
                 throw new \LogicException("Unhandled type '{$field->getType()}'.");
         }
         if ($field->getLabel() === FieldDescriptorProto\LabelEnum::LABEL_REPEATED) {
             $phpType .= "[]";
         }
         $property->addComment("@var {$phpType}");
         if (isset($see)) {
             $property->addComment("@see {$see}");
             unset($see);
         }
         $property->addComment("")->addComment("@Skrz\\Meta\\Protobuf\\ProtobufField(" . "number={$field->getNumber()}" . ", wireType=\"{$wireType}\"" . ", unsigned=" . var_export(isset($unsigned) ? $unsigned : false, true) . ", packed=" . var_export($field->getOptions() ? $field->getOptions()->getPacked() : false, true) . ")");
         $getter = $class->addMethod("get" . ucfirst($propertyName));
         $getter->addComment("@return {$phpType}");
         $getter->addBody("return \$this->{$propertyName};");
         $setter = $class->addMethod("set" . ucfirst($propertyName));
         $setter->addParameter($propertyName);
         $setter->addComment("@param {$phpType} \${$propertyName}")->addComment("")->addComment("@return self");
         $setter->addBody("\$this->{$propertyName} = \${$propertyName};")->addBody("return \$this;");
     }
     return new Result($file, $class);
 }
开发者ID:jakubkulhan,项目名称:meta,代码行数:97,代码来源:ProtocGenPhp.php


示例3: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BuyItemPokeCoinsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Platform.Responses.BuyItemPokeCoinsResponse.Status'])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:BuyItemPokeCoinsResponse.php


示例4: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'FortDetailsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'fort_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'team_color', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.TeamColor']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'pokemon_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PokemonData']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'image_urls', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'fp', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'max_stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Map.Fort.FortType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'latitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'longitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'description', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'modifiers', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Map.Fort.FortModifier'])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:FortDetailsResponse.php


示例5: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'SfidaActionLogResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.SfidaActionLogResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'log_entries', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Logs.ActionLogEntry'])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:SfidaActionLogResponse.php


示例6: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CheckAwardedBadgesResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'success', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'awarded_badges', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.BadgeType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'awarded_badge_levels', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:CheckAwardedBadgesResponse.php


示例7: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'SourceCodeInfo', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'location', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.SourceCodeInfo.Location'])]]);
 }
开发者ID:protobuf-php,项目名称:google-protobuf-proto,代码行数:7,代码来源:SourceCodeInfo.php


示例8: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BattleResults', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'gym_state', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Gym.GymState']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'attackers', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'player_experience_awarded', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'next_defender_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'gym_points_delta', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:BattleResults.php


示例9: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'ItemAward', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'item_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.Item.ItemId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'item_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:ItemAward.php


示例10: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'DailyBonus', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'next_collected_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'next_defender_bonus_collect_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:DailyBonus.php


示例11: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'DescriptorProto', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'field', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.FieldDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'extension', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.FieldDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'nested_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'enum_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.EnumDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'extension_range', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto.ExtensionRange']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'oneof_decl', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.OneofDescriptorProto']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'options', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.google.protobuf.MessageOptions']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'reserved_range', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.google.protobuf.DescriptorProto.ReservedRange']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'reserved_name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
 }
开发者ID:protobuf-php,项目名称:google-protobuf-proto,代码行数:7,代码来源:DescriptorProto.php


示例12: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BattleAttributes', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'sta_percent', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:BattleAttributes.php


示例13: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'RegisterBackgroundDeviceMessage', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'device_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'device_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:RegisterBackgroundDeviceMessage.php


示例14: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'GymBattleSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'energy_per_sec', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'dodge_energy_cost', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'retarget_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'enemy_attack_interval', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'attack_server_interval', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'round_duration_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'bonus_time_per_ally_seconds', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'maximum_attackers_per_battle', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'same_type_attack_bonus_multiplier', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'maximum_energy', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'energy_delta_per_health_lost', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'dodge_duration_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'minimum_player_level', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 14, 'name' => 'swap_duration_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 15, 'name' => 'dodge_damage_reduction_percent', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:GymBattleSettings.php


示例15: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'InventoryUpgradeAttributes', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'additional_storage', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'upgrade_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.InventoryUpgradeType'])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:InventoryUpgradeAttributes.php


示例16: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'GetBuddyWalkedResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'success', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'family_candy_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonFamilyId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'candy_earned_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:GetBuddyWalkedResponse.php


示例17: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'FortLureInfo', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'fort_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'encounter_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'active_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'lure_expires_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:FortLureInfo.php


示例18: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'WildPokemon', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'encounter_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'last_modified_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'latitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'longitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'spawn_point_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'pokemon_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PokemonData']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'time_till_hidden_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:WildPokemon.php


示例19: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'GetPlayerMessage', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'player_locale', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale'])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:GetPlayerMessage.php


示例20: descriptor

 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'DailyQuestSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'buckets_per_day', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'streak_length', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'bonus_multiplier', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'streak_bonus_multiplier', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
开发者ID:jaspervdm,项目名称:pogoprotos-php,代码行数:7,代码来源:DailyQuestSettings.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Protobuf\FieldDescriptorProto类代码示例发布时间:2022-05-23
下一篇:
PHP Db\FindParams类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap