aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Internal
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-03-17 11:08:06 -0700
committerGravatar GitHub <noreply@github.com>2017-03-17 11:08:06 -0700
commit6b27c1f981a9a93918e4039f236ead27165a8e91 (patch)
tree980c622c849bc84be49b70996ce4e19979ba9122 /php/src/Google/Protobuf/Internal
parentc0871aa49c685e3aca19244c67d54ff321a62865 (diff)
Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in the containing file.
Diffstat (limited to 'php/src/Google/Protobuf/Internal')
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorProto.php32
-rw-r--r--php/src/Google/Protobuf/Internal/EnumDescriptorProto.php4
-rw-r--r--php/src/Google/Protobuf/Internal/EnumOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/EnumValueOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php7
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions_CType.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions_JSType.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FileDescriptorProto.php28
-rw-r--r--php/src/Google/Protobuf/Internal/FileDescriptorSet.php4
-rw-r--r--php/src/Google/Protobuf/Internal/FileOptions.php47
-rw-r--r--php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php4
-rw-r--r--php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php4
-rw-r--r--php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php4
-rw-r--r--php/src/Google/Protobuf/Internal/MessageOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/MethodOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php4
-rw-r--r--php/src/Google/Protobuf/Internal/OneofOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php4
-rw-r--r--php/src/Google/Protobuf/Internal/ServiceOptions.php4
-rw-r--r--php/src/Google/Protobuf/Internal/SourceCodeInfo.php4
-rw-r--r--php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php12
-rw-r--r--php/src/Google/Protobuf/Internal/UninterpretedOption.php4
24 files changed, 124 insertions, 78 deletions
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto.php b/php/src/Google/Protobuf/Internal/DescriptorProto.php
index f076f6be..948c5876 100644
--- a/php/src/Google/Protobuf/Internal/DescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/DescriptorProto.php
@@ -117,8 +117,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setField(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->field = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->field = $arr;
$this->has_field = true;
}
@@ -140,8 +140,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setExtension(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->extension = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $arr;
$this->has_extension = true;
}
@@ -163,8 +163,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setNestedType(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
- $this->nested_type = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->nested_type = $arr;
$this->has_nested_type = true;
}
@@ -186,8 +186,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setEnumType(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
- $this->enum_type = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $arr;
$this->has_enum_type = true;
}
@@ -209,8 +209,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setExtensionRange(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
- $this->extension_range = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class);
+ $this->extension_range = $arr;
$this->has_extension_range = true;
}
@@ -232,8 +232,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setOneofDecl(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
- $this->oneof_decl = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
+ $this->oneof_decl = $arr;
$this->has_oneof_decl = true;
}
@@ -278,8 +278,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setReservedRange(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
- $this->reserved_range = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class);
+ $this->reserved_range = $arr;
$this->has_reserved_range = true;
}
@@ -311,8 +311,8 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setReservedName(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->reserved_name = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->reserved_name = $arr;
$this->has_reserved_name = true;
}
diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
index 9c5f245b..73f6edbd 100644
--- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
@@ -77,8 +77,8 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setValue(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
- $this->value = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
+ $this->value = $arr;
$this->has_value = true;
}
diff --git a/php/src/Google/Protobuf/Internal/EnumOptions.php b/php/src/Google/Protobuf/Internal/EnumOptions.php
index a9c4e0d7..4fa0bce7 100644
--- a/php/src/Google/Protobuf/Internal/EnumOptions.php
+++ b/php/src/Google/Protobuf/Internal/EnumOptions.php
@@ -144,8 +144,8 @@ class EnumOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/EnumValueOptions.php b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
index 6446ecd4..232a6738 100644
--- a/php/src/Google/Protobuf/Internal/EnumValueOptions.php
+++ b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -101,8 +101,8 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
index 06f26015..a3cd8ef9 100644
--- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
+++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
@@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* Protobuf enum <code>google.protobuf.FieldDescriptorProto.Label</code>
*/
-namespace Google\Protobuf\Internal;
-
class FieldDescriptorProto_Label
{
/**
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
index 9bda76c2..8335f9b1 100644
--- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
+++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
@@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* Protobuf enum <code>google.protobuf.FieldDescriptorProto.Type</code>
*/
-namespace Google\Protobuf\Internal;
-
class FieldDescriptorProto_Type
{
/**
@@ -63,6 +63,9 @@ class FieldDescriptorProto_Type
/**
* <pre>
* Tag-delimited aggregate.
+ * Group type is deprecated and not supported in proto3. However, Proto3
+ * implementations should still be able to parse the group wire format and
+ * treat group fields as unknown fields.
* </pre>
*
* <code>TYPE_GROUP = 10;</code>
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php
index af1393a5..8db7ed67 100644
--- a/php/src/Google/Protobuf/Internal/FieldOptions.php
+++ b/php/src/Google/Protobuf/Internal/FieldOptions.php
@@ -415,8 +415,8 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions_CType.php b/php/src/Google/Protobuf/Internal/FieldOptions_CType.php
index 2ff2a478..f59f20be 100644
--- a/php/src/Google/Protobuf/Internal/FieldOptions_CType.php
+++ b/php/src/Google/Protobuf/Internal/FieldOptions_CType.php
@@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* Protobuf enum <code>google.protobuf.FieldOptions.CType</code>
*/
-namespace Google\Protobuf\Internal;
-
class FieldOptions_CType
{
/**
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php b/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php
index 541c8ae5..0c6995b7 100644
--- a/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php
+++ b/php/src/Google/Protobuf/Internal/FieldOptions_JSType.php
@@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* Protobuf enum <code>google.protobuf.FieldOptions.JSType</code>
*/
-namespace Google\Protobuf\Internal;
-
class FieldOptions_JSType
{
/**
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
index 39f67768..0363d9e9 100644
--- a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
@@ -206,8 +206,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setDependency(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->dependency = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->dependency = $arr;
$this->has_dependency = true;
}
@@ -237,8 +237,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setPublicDependency(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->public_dependency = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->public_dependency = $arr;
$this->has_public_dependency = true;
}
@@ -270,8 +270,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setWeakDependency(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->weak_dependency = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->weak_dependency = $arr;
$this->has_weak_dependency = true;
}
@@ -301,8 +301,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setMessageType(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
- $this->message_type = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
+ $this->message_type = $arr;
$this->has_message_type = true;
}
@@ -324,8 +324,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setEnumType(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
- $this->enum_type = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
+ $this->enum_type = $arr;
$this->has_enum_type = true;
}
@@ -347,8 +347,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setService(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
- $this->service = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ServiceDescriptorProto::class);
+ $this->service = $arr;
$this->has_service = true;
}
@@ -370,8 +370,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setExtension(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
- $this->extension = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
+ $this->extension = $arr;
$this->has_extension = true;
}
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
index 20a165c4..0bcc8051 100644
--- a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
@@ -45,8 +45,8 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message
*/
public function setFile(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
- $this->file = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FileDescriptorProto::class);
+ $this->file = $arr;
$this->has_file = true;
}
diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php
index 2422f3ee..22653a4f 100644
--- a/php/src/Google/Protobuf/Internal/FileOptions.php
+++ b/php/src/Google/Protobuf/Internal/FileOptions.php
@@ -178,6 +178,16 @@ class FileOptions extends \Google\Protobuf\Internal\Message
private $has_swift_prefix = false;
/**
* <pre>
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ * </pre>
+ *
+ * <code>optional string php_class_prefix = 40;</code>
+ */
+ private $php_class_prefix = '';
+ private $has_php_class_prefix = false;
+ /**
+ * <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
@@ -708,6 +718,39 @@ class FileOptions extends \Google\Protobuf\Internal\Message
/**
* <pre>
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ * </pre>
+ *
+ * <code>optional string php_class_prefix = 40;</code>
+ */
+ public function getPhpClassPrefix()
+ {
+ return $this->php_class_prefix;
+ }
+
+ /**
+ * <pre>
+ * Sets the php class prefix which is prepended to all php generated classes
+ * from this .proto. Default is empty.
+ * </pre>
+ *
+ * <code>optional string php_class_prefix = 40;</code>
+ */
+ public function setPhpClassPrefix($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->php_class_prefix = $var;
+ $this->has_php_class_prefix = true;
+ }
+
+ public function hasPhpClassPrefix()
+ {
+ return $this->has_php_class_prefix;
+ }
+
+ /**
+ * <pre>
* The parser stores options it doesn't recognize here. See above.
* </pre>
*
@@ -727,8 +770,8 @@ class FileOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php b/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
index 7fd488eb..b550e7f1 100644
--- a/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
+++ b/php/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
@@ -2,6 +2,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* <pre>
* Generated classes can be optimized for speed or code size.
@@ -9,8 +11,6 @@
*
* Protobuf enum <code>google.protobuf.FileOptions.OptimizeMode</code>
*/
-namespace Google\Protobuf\Internal;
-
class FileOptions_OptimizeMode
{
/**
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
index 8e493c2f..450854f1 100644
--- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
@@ -61,8 +61,8 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
*/
public function setAnnotation(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
- $this->annotation = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
+ $this->annotation = $arr;
$this->has_annotation = true;
}
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
index dcc7edfe..ed22cc38 100644
--- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
@@ -85,8 +85,8 @@ class GeneratedCodeInfo_Annotation extends \Google\Protobuf\Internal\Message
*/
public function setPath(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->path = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $arr;
$this->has_path = true;
}
diff --git a/php/src/Google/Protobuf/Internal/MessageOptions.php b/php/src/Google/Protobuf/Internal/MessageOptions.php
index e4a214cb..747f3294 100644
--- a/php/src/Google/Protobuf/Internal/MessageOptions.php
+++ b/php/src/Google/Protobuf/Internal/MessageOptions.php
@@ -320,8 +320,8 @@ class MessageOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/MethodOptions.php b/php/src/Google/Protobuf/Internal/MethodOptions.php
index 3325e52b..6dca5854 100644
--- a/php/src/Google/Protobuf/Internal/MethodOptions.php
+++ b/php/src/Google/Protobuf/Internal/MethodOptions.php
@@ -129,8 +129,8 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php b/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
index 62768b5c..ce4adfe7 100644
--- a/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
+++ b/php/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
@@ -2,6 +2,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
+namespace Google\Protobuf\Internal;
+
/**
* <pre>
* Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
@@ -11,8 +13,6 @@
*
* Protobuf enum <code>google.protobuf.MethodOptions.IdempotencyLevel</code>
*/
-namespace Google\Protobuf\Internal;
-
class MethodOptions_IdempotencyLevel
{
/**
diff --git a/php/src/Google/Protobuf/Internal/OneofOptions.php b/php/src/Google/Protobuf/Internal/OneofOptions.php
index 083d9929..b61325d2 100644
--- a/php/src/Google/Protobuf/Internal/OneofOptions.php
+++ b/php/src/Google/Protobuf/Internal/OneofOptions.php
@@ -52,8 +52,8 @@ class OneofOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
index 624bde84..47776202 100644
--- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
@@ -77,8 +77,8 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
*/
public function setMethod(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
- $this->method = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
+ $this->method = $arr;
$this->has_method = true;
}
diff --git a/php/src/Google/Protobuf/Internal/ServiceOptions.php b/php/src/Google/Protobuf/Internal/ServiceOptions.php
index 5f3564e4..62323dba 100644
--- a/php/src/Google/Protobuf/Internal/ServiceOptions.php
+++ b/php/src/Google/Protobuf/Internal/ServiceOptions.php
@@ -101,8 +101,8 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
*/
public function setUninterpretedOption(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
- $this->uninterpreted_option = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
+ $this->uninterpreted_option = $arr;
$this->has_uninterpreted_option = true;
}
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
index d2352ddd..eab60880 100644
--- a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
@@ -177,8 +177,8 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
*/
public function setLocation(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo_Location::class);
- $this->location = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo_Location::class);
+ $this->location = $arr;
$this->has_location = true;
}
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
index d1bdb166..5a02b26c 100644
--- a/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
@@ -179,8 +179,8 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
*/
public function setPath(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->path = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->path = $arr;
$this->has_path = true;
}
@@ -218,8 +218,8 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
*/
public function setSpan(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->span = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
+ $this->span = $arr;
$this->has_span = true;
}
@@ -365,8 +365,8 @@ class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message
*/
public function setLeadingDetachedComments(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->leading_detached_comments = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->leading_detached_comments = $arr;
$this->has_leading_detached_comments = true;
}
diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption.php b/php/src/Google/Protobuf/Internal/UninterpretedOption.php
index c0f48310..28655019 100644
--- a/php/src/Google/Protobuf/Internal/UninterpretedOption.php
+++ b/php/src/Google/Protobuf/Internal/UninterpretedOption.php
@@ -84,8 +84,8 @@ class UninterpretedOption extends \Google\Protobuf\Internal\Message
*/
public function setName(&$var)
{
- GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
- $this->name = $var;
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
+ $this->name = $arr;
$this->has_name = true;
}