Re: [PHP] "Bless"ing an object

2003-11-26 Thread Raditha Dissanayake
Hi, Hmm, seriailze and deserialize.. Don't think that's what I would want to do. You probably mean that I can serialize an object, hack the string to change the Class reference. That's not really what I want to do. more or less yes Right now I'm hacking through it by *) Creating a new i

RE: [PHP] "Bless"ing an object

2003-11-26 Thread Wouter van Vliet
Raditha Dissanayake wrote: > Hi Wouter, > > Wouter van Vliet wrote: > >> Hi Folks >> >> I was wondering (mostly because I came across some situations where >> I need it) if PHP supplies any methods to "bless" an array or object >> to become some other object. In perl, I can simply do: (..) >> >

Re: [PHP] "Bless"ing an object

2003-11-25 Thread Raditha Dissanayake
Hi Wouter, I suspect that the reason that you find bless in perl is because it's OO foundations are not as strong as even that of PHP. Well PHP's OO foundations are weak enough. :-) The specific scenario you have described can IMHO be achieved with the use of serialize / deserialize. Wouter

[PHP] "Bless"ing an object

2003-11-25 Thread Wouter van Vliet
Hi Folks I was wondering (mostly because I came across some situations where I need it) if PHP supplies any methods to "bless" an array or object to become some other object. In perl, I can simply do: my $SomeInstance = bless { item => 'value', 'Item2' => 'value2' }, 'SomeObject'; And th