aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Internal/GPBUtil.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/src/Google/Protobuf/Internal/GPBUtil.php')
-rw-r--r--php/src/Google/Protobuf/Internal/GPBUtil.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/php/src/Google/Protobuf/Internal/GPBUtil.php b/php/src/Google/Protobuf/Internal/GPBUtil.php
index ec0bf6bd..b75d9bab 100644
--- a/php/src/Google/Protobuf/Internal/GPBUtil.php
+++ b/php/src/Google/Protobuf/Internal/GPBUtil.php
@@ -305,8 +305,11 @@ class GPBUtil
$name,
$file_proto)
{
- $classname = implode('_', explode('.', $name));
- return static::getClassNamePrefix($classname, $file_proto) . $classname;
+ $parts = explode('.', $name);
+ foreach ($parts as $i => $part) {
+ $parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
+ }
+ return implode('\\', $parts);
}
public static function getClassNameWithoutPackage(