From 397ddf9e5c7876e907ffd42256cb469f340268ef Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Fri, 25 May 2018 15:24:42 -0700 Subject: Add back GeneratedClassName to public (#4686) These methods are used by grpc --- src/google/protobuf/compiler/php/php_generator.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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 -- cgit v1.2.3