summaryrefslogtreecommitdiff
path: root/php/src/IcePHP/Profile.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-06-19 11:25:17 -0700
committerMark Spruiell <mes@zeroc.com>2007-06-19 11:25:17 -0700
commitddcfe70b4f05fb00e466486fc19076147f79298d (patch)
treeacfa4428263b22b3f9226d04a3fe8f910bd21bdd /php/src/IcePHP/Profile.cpp
parentFor UDP multicast bind to the multicast address rather than 0.0.0.0 unless on... (diff)
downloadice-ddcfe70b4f05fb00e466486fc19076147f79298d.tar.bz2
ice-ddcfe70b4f05fb00e466486fc19076147f79298d.tar.xz
ice-ddcfe70b4f05fb00e466486fc19076147f79298d.zip
bug 2245 - adding support for protected class data members
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