aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/php/php_generator.h
diff options
context:
space:
mode:
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, 11 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/php/php_generator.h b/src/google/protobuf/compiler/php/php_generator.h
index ce2b000a..b851d9b4 100644
--- a/src/google/protobuf/compiler/php/php_generator.h
+++ b/src/google/protobuf/compiler/php/php_generator.h
@@ -32,6 +32,7 @@
#define GOOGLE_PROTOBUF_COMPILER_PHP_GENERATOR_H__
#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/descriptor.h>
#include <string>
@@ -49,6 +50,16 @@ class LIBPROTOC_EXPORT Generator
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