aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src
diff options
context:
space:
mode:
authorGravatar Jisi Liu <liujisi@google.com>2017-08-21 10:39:27 -0700
committerGravatar GitHub <noreply@github.com>2017-08-21 10:39:27 -0700
commitba4e54724d2e6a1881c4fe88664d81fbacaf8c08 (patch)
tree5451ab616f035b92d006e51ec01b4c0dabb3f6d0 /php/src
parent472f700884a2cd4e9b621c5e4b706a9b6de7c870 (diff)
parent139775ccc040a07e07c5407e34834dab27928cbc (diff)
Merge pull request #3529 from pherl/merge3.4.x
Merge 3.4.x into master
Diffstat (limited to 'php/src')
-rw-r--r--php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php5
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php33
-rw-r--r--php/src/Google/Protobuf/Internal/FieldOptions.php45
3 files changed, 62 insertions, 21 deletions
diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
index 1e3c745e..60722d00 100644
--- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
+++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -49,6 +49,7 @@ class Descriptor
$pool->addMessage('google.protobuf.internal.DescriptorProto.ExtensionRange', \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class)
->optional('start', \Google\Protobuf\Internal\GPBType::INT32, 1)
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
+ ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 3, 'google.protobuf.internal.ExtensionRangeOptions')
->finalizeToPool();
$pool->addMessage('google.protobuf.internal.DescriptorProto.ReservedRange', \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class)
@@ -56,6 +57,10 @@ class Descriptor
->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 2)
->finalizeToPool();
+ $pool->addMessage('google.protobuf.internal.ExtensionRangeOptions', \Google\Protobuf\Internal\ExtensionRangeOptions::class)
+ ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption')
+ ->finalizeToPool();
+
$pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class)
->optional('name', \Google\Protobuf\Internal\GPBType::STRING, 1)
->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 3)
diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
index 51d5d359..1d455995 100644
--- a/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
+++ b/php/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
@@ -25,6 +25,11 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
*/
private $end = 0;
private $has_end = false;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ */
+ private $options = null;
+ private $has_options = false;
public function __construct() {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
@@ -87,5 +92,33 @@ class DescriptorProto_ExtensionRange extends \Google\Protobuf\Internal\Message
return $this->has_end;
}
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @return \Google\Protobuf\Internal\ExtensionRangeOptions
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @param \Google\Protobuf\Internal\ExtensionRangeOptions $var
+ * @return $this
+ */
+ public function setOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ExtensionRangeOptions::class);
+ $this->options = $var;
+ $this->has_options = true;
+
+ return $this;
+ }
+
+ public function hasOptions()
+ {
+ return $this->has_options;
+ }
+
}
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php
index 3144e670..169f860b 100644
--- a/php/src/Google/Protobuf/Internal/FieldOptions.php
+++ b/php/src/Google/Protobuf/Internal/FieldOptions.php
@@ -39,13 +39,14 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
/**
* The jstype option determines the JavaScript type used for values of the
* field. The option is permitted only for 64 bit integral and fixed types
- * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
- * represented as JavaScript strings. This avoids loss of precision that can
- * happen when a large value is converted to a floating point JavaScript
- * numbers. Specifying JS_NUMBER for the jstype causes the generated
- * JavaScript code to use the JavaScript "number" type instead of strings.
- * This option is an enum to permit additional types to be added,
- * e.g. goog.math.Integer.
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
*
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
*/
@@ -192,13 +193,14 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
/**
* The jstype option determines the JavaScript type used for values of the
* field. The option is permitted only for 64 bit integral and fixed types
- * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
- * represented as JavaScript strings. This avoids loss of precision that can
- * happen when a large value is converted to a floating point JavaScript
- * numbers. Specifying JS_NUMBER for the jstype causes the generated
- * JavaScript code to use the JavaScript "number" type instead of strings.
- * This option is an enum to permit additional types to be added,
- * e.g. goog.math.Integer.
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
*
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
* @return int
@@ -211,13 +213,14 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
/**
* The jstype option determines the JavaScript type used for values of the
* field. The option is permitted only for 64 bit integral and fixed types
- * (int64, uint64, sint64, fixed64, sfixed64). By default these types are
- * represented as JavaScript strings. This avoids loss of precision that can
- * happen when a large value is converted to a floating point JavaScript
- * numbers. Specifying JS_NUMBER for the jstype causes the generated
- * JavaScript code to use the JavaScript "number" type instead of strings.
- * This option is an enum to permit additional types to be added,
- * e.g. goog.math.Integer.
+ * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ * is represented as JavaScript string, which avoids loss of precision that
+ * can happen when a large value is converted to a floating point JavaScript.
+ * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ * use the JavaScript "number" type. The behavior of the default option
+ * JS_NORMAL is implementation dependent.
+ * This option is an enum to permit additional types to be added, e.g.
+ * goog.math.Integer.
*
* Generated from protobuf field <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
* @param int $var