diff options
author | michaelbausor <michaelbausor@google.com> | 2017-08-04 16:35:22 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2017-08-04 16:35:22 -0700 |
commit | 21b0e5587c01948927ede9be789671ff116b7ad4 (patch) | |
tree | 8bb156c68677804739e65c3b4ee6cd9f891797f2 /php/src/Google/Protobuf/Internal/FieldDescriptor.php | |
parent | 1ab5adbdec4d6487c8e6f230138092d27d6a0818 (diff) | |
download | protobuf-21b0e5587c01948927ede9be789671ff116b7ad4.tar.gz protobuf-21b0e5587c01948927ede9be789671ff116b7ad4.tar.bz2 protobuf-21b0e5587c01948927ede9be789671ff116b7ad4.zip |
Update PHP descriptors (#3391)
* Add descriptors test
* Update descriptors tests
* Add public descriptors
* Add test_desriptors.proto to test script
* Update composer files
* Remove references to GPBType, update tests to be compatible with c
* Update for c extension compatibility
* Remove nested enums for descriptor, update tests
* Strip leading '.' from descriptor name
* Update tests with test for getClass, fix OneofDescriptor
* Add new files to Makefile.am
Diffstat (limited to 'php/src/Google/Protobuf/Internal/FieldDescriptor.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/FieldDescriptor.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptor.php b/php/src/Google/Protobuf/Internal/FieldDescriptor.php index f18bf810..1443c6fd 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptor.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptor.php @@ -34,6 +34,7 @@ namespace Google\Protobuf\Internal; class FieldDescriptor { + use HasPublicDescriptorTrait; private $name; private $json_name; @@ -48,6 +49,11 @@ class FieldDescriptor private $is_map; private $oneof_index = -1; + public function __construct() + { + $this->public_desc = new \Google\Protobuf\FieldDescriptor($this); + } + public function setOneofIndex($index) { $this->oneof_index = $index; |