FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » out of sheer curiosity...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: out of sheer curiosity... [message #177622 is a reply to message #177617] Tue, 10 April 2012 23:43 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/10/2012 5:30 PM, Thomas Mlynarczyk wrote:
> Jerry Stuckle schrieb:
>
> [setting data on object before constructor is called]
>> I agree that it "feels wrong", but is perfectly valid. There are other
>> examples - for instance in Java and C++, the vase class constructor is
>> called before the derived class constructor.
>
> The base constructor, okay, yes. But setting data on the object,
> possibly invoking __set() which, in turn might (need to) do things
> requiring prior object initialization?
>

That is correct. That way __set() does not need to check to see if the
object has been initialized already.

> [PDO does not use __set_state()]
>> Possibly for future use? Most of PDO was written before __set_state()
>> was added, so maybe newer versions will use it.
>
> Hm, maybe. Meanwhile I think I can live with the fact that the
> constructor is called after setting the data. It's just something one
> must know and remember...
>
> Greetings,
> Thomas
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 5.4 windows installer.
Next Topic: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 06:07:50 GMT 2024

Total time taken to generate the page: 0.04278 seconds