Page 1 of 1

Parent and child class relationship problem

Posted: Thu Apr 17, 2008 12:06 am
by mabus
Hi guys. I'm a new member of this forum, and seems to me that it si quite promising.

Now, this would be my first post, and I'd like to share a bit of a problem.

Here's the situation...

I have two classes , one is a parent class, and the other is a child that extends to it. Now both classes have private memebers that are accessed via properties. Now, what I want to do is to iterate through the object, from the child class, and be able to get the members of the parent class too. How can I do this?

Re: Parent and child class relationship problem

Posted: Thu Apr 17, 2008 12:59 am
by Christopher

Re: Parent and child class relationship problem

Posted: Thu Apr 17, 2008 10:30 am
by mabus
hhmm..this one didn't seem to work for me. This function did not return anything, and I think I know the reason why.

In my object, all the members are private, and only accessed through properties. I guess what this functions does is to return just the members, if they are public, which is also the default on php.