THRIFT-1496 PHP compiler not namespacing enums
authorRoger Meier <roger@apache.org>
Fri, 20 Jan 2012 14:34:49 +0000 (14:34 +0000)
committerRoger Meier <roger@apache.org>
Fri, 20 Jan 2012 14:34:49 +0000 (14:34 +0000)
Patch: Andrew Grumet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1233930 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_php_generator.cc

index ab308ab..91beb73 100644 (file)
@@ -415,7 +415,7 @@ void t_php_generator::generate_enum(t_enum* tenum) {
   // code but you can't do things like an 'extract' on it, which is a bit of
   // a downer.
   f_types_ <<
-    "final class " << tenum->get_name() << " {" << endl;
+    "final class " << php_namespace(tenum->get_program()) << tenum->get_name() << " {" << endl;
   indent_up();
 
   for (c_iter = constants.begin(); c_iter != constants.end(); ++c_iter) {