Greg Beaver wrote:
Sort of :)
In PHP5, this will work.
[...]
Very nice, thanks a lot :-)
However, you won't have access to private or protected data members.
Damn! that's exactly what I want! :-(
It is always better to rigidly define your methods, and extend the class as someone else suggested.
The problem is that I need to serialize some objects to put them on a database, but I'll have problems when some of these objects contains another ones from third parties where I do not control the inheritance and I've not access directly to object fields.
Converting the object to an array is useful for serialization, as I can access private and protected object member values, but I cannot unserialize them because I cannot wrote those members again.
Never mind. I surely must rethink the matter again.
Thanks a million, Greg.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php