From 6b27c1f981a9a93918e4039f236ead27165a8e91 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Fri, 17 Mar 2017 11:08:06 -0700 Subject: Add file option php_class_prefix (#2849) This option will be prepended to generated classes of all messages in the containing file. --- .../Protobuf/Internal/FileDescriptorProto.php | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'php/src/Google/Protobuf/Internal/FileDescriptorProto.php') 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; } -- cgit v1.2.3