aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Internal/Descriptor.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/src/Google/Protobuf/Internal/Descriptor.php')
-rw-r--r--php/src/Google/Protobuf/Internal/Descriptor.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/php/src/Google/Protobuf/Internal/Descriptor.php b/php/src/Google/Protobuf/Internal/Descriptor.php
index ee3a8bde..21ac5de3 100644
--- a/php/src/Google/Protobuf/Internal/Descriptor.php
+++ b/php/src/Google/Protobuf/Internal/Descriptor.php
@@ -44,6 +44,7 @@ class Descriptor
private $nested_type = [];
private $enum_type = [];
private $klass;
+ private $legacy_klass;
private $options;
private $oneof_decl = [];
@@ -151,6 +152,16 @@ class Descriptor
return $this->klass;
}
+ public function setLegacyClass($klass)
+ {
+ $this->legacy_klass = $klass;
+ }
+
+ public function getLegacyClass()
+ {
+ return $this->legacy_klass;
+ }
+
public function setOptions($options)
{
$this->options = $options;
@@ -167,16 +178,19 @@ class Descriptor
$message_name_without_package = "";
$classname = "";
+ $legacy_classname = "";
$fullname = "";
GPBUtil::getFullClassName(
$proto,
$containing,
$file_proto,
$message_name_without_package,
+ $legacy_classname,
$classname,
$fullname);
$desc->setFullName($fullname);
$desc->setClass($classname);
+ $desc->setLegacyClass($legacy_classname);
$desc->setOptions($proto->getOptions());
foreach ($proto->getField() as $field_proto) {