aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/php/php_generator.h
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2018-05-30 14:40:42 -0700
committerGitHub <noreply@github.com>2018-05-30 14:40:42 -0700
commita239ed2bda4b246c10c9d0d2a11a1f7bb1f52c86 (patch)
tree7c1ee1fb815911af3be04cd0ea163f66abd5a4bc /src/google/protobuf/compiler/php/php_generator.h
parentd31864a7ed97c64426ee06c63b48f5992a52104a (diff)
parent4f5eb100bb2086622b1f3aaec472d83768b68b32 (diff)
downloadprotobuf-a239ed2bda4b246c10c9d0d2a11a1f7bb1f52c86.tar.gz
protobuf-a239ed2bda4b246c10c9d0d2a11a1f7bb1f52c86.tar.bz2
protobuf-a239ed2bda4b246c10c9d0d2a11a1f7bb1f52c86.zip
Merge pull request #4702 from TeBoring/3.6.xv3.6.0rc2
Cherry-pick changes into 3.6.x
Diffstat (limited to 'src/google/protobuf/compiler/php/php_generator.h')
-rw-r--r--src/google/protobuf/compiler/php/php_generator.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/php/php_generator.h b/src/google/protobuf/compiler/php/php_generator.h
index 1e011511..b851d9b4 100644
--- a/src/google/protobuf/compiler/php/php_generator.h
+++ b/src/google/protobuf/compiler/php/php_generator.h
@@ -48,9 +48,18 @@ class LIBPROTOC_EXPORT Generator
const string& parameter,
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
} // namespace compiler
} // namespace protobuf