aboutsummaryrefslogtreecommitdiff
path: root/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
diff options
context:
space:
mode:
authorBrent Shaffer <betterbrent@google.com>2018-05-02 14:40:15 -0700
committerBo Yang <teboring@google.com>2018-05-15 09:48:43 -0700
commitca07512bac51667feb0ed999ac09fe1b92c9e4ec (patch)
treec435922825f3e6e124258695011d4394b44ff1d2 /php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
parentb83b8e3d448fa5395792630a61aad5e09ff74552 (diff)
downloadprotobuf-ca07512bac51667feb0ed999ac09fe1b92c9e4ec.tar.gz
protobuf-ca07512bac51667feb0ed999ac09fe1b92c9e4ec.tar.bz2
protobuf-ca07512bac51667feb0ed999ac09fe1b92c9e4ec.zip
PHP array constructors for protobuf messages (#4530)
* PHP array constructors for protobuf messages * removes Descriptor from error message * allows mergeFrom to accept an array * only use initWithDescriptor if instanceof MapEntry * adds doc comments * removes ability for constructors to take arrays for submessages * Revert "allows mergeFrom to accept an array" This reverts commit b7b72182d561634af12c5c5c56a7cda3b33241f9. * makes mergeFromArray protected and fixes mergeFrom whitespace * Separates merging from JSON and merging from PHP array * removes well-known types and json keys from array construction * Addresses PR review comments * cleans up tests * fixes exception messages
Diffstat (limited to 'php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php')
-rw-r--r--php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php b/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
index c9a6fc3c..d4369fda 100644
--- a/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
+++ b/php/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
@@ -32,9 +32,19 @@ class UninterpretedOption_NamePart extends \Google\Protobuf\Internal\Message
private $is_extension = false;
private $has_is_extension = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name_part
+ * @type bool $is_extension
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**