summaryrefslogtreecommitdiff
path: root/php/src/IcePHP/Profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'php/src/IcePHP/Profile.cpp')
-rw-r--r--php/src/IcePHP/Profile.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/php/src/IcePHP/Profile.cpp b/php/src/IcePHP/Profile.cpp
index 5d00cef2494..84a9c2c22ba 100644
--- a/php/src/IcePHP/Profile.cpp
+++ b/php/src/IcePHP/Profile.cpp
@@ -1126,7 +1126,16 @@ IcePHP::CodeVisitor::visitOperation(const Slice::OperationPtr& p)
void
IcePHP::CodeVisitor::visitDataMember(const Slice::DataMemberPtr& p)
{
- _out << "public $" << fixIdent(p->name()) << ';' << endl;
+ Slice::ContainedPtr cont = Slice::ContainedPtr::dynamicCast(p->container());
+ assert(cont);
+ if(Slice::ClassDefPtr::dynamicCast(cont) && (cont->hasMetaData("protected") || p->hasMetaData("protected")))
+ {
+ _out << "protected $" << fixIdent(p->name()) << ';' << endl;
+ }
+ else
+ {
+ _out << "public $" << fixIdent(p->name()) << ';' << endl;
+ }
}
void