aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2018-05-25 15:24:42 -0700
committerBo Yang <teboring@google.com>2018-05-30 10:46:48 -0700
commit397ddf9e5c7876e907ffd42256cb469f340268ef (patch)
tree141971a82775b3a5d17c63d979eef5ccbe258286
parent6c12ff5a05a7ed283f5c972af47d0c426cd9bb34 (diff)
downloadprotobuf-397ddf9e5c7876e907ffd42256cb469f340268ef.tar.gz
protobuf-397ddf9e5c7876e907ffd42256cb469f340268ef.tar.bz2
protobuf-397ddf9e5c7876e907ffd42256cb469f340268ef.zip
Add back GeneratedClassName to public (#4686)
These methods are used by grpc
-rw-r--r--src/google/protobuf/compiler/php/php_generator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/php/php_generator.h b/src/google/protobuf/compiler/php/php_generator.h
index 1e011511..82109ec4 100644
--- a/src/google/protobuf/compiler/php/php_generator.h
+++ b/src/google/protobuf/compiler/php/php_generator.h
@@ -49,6 +49,16 @@ class LIBPROTOC_EXPORT Generator
GeneratorContext* generator_context,
string* error) const;
+ // To skip reserved keywords in php, some generated classname are prefixed.
+ // Other code generators may need following API to figure out the actual
+ // classname.
+ LIBPROTOC_EXPORT std::string GeneratedClassName(
+ const google::protobuf::Descriptor* desc);
+ LIBPROTOC_EXPORT std::string GeneratedClassName(
+ const google::protobuf::EnumDescriptor* desc);
+ LIBPROTOC_EXPORT std::string GeneratedClassName(
+ const google::protobuf::ServiceDescriptor* desc);
+
};
} // namespace php