[PHP] Object reference into variable?

2007-08-07 Thread GMail
Hello, I have a question (what a surprise :-) ) I browsed the archives, but didn't find what I'm looking for. I have an object instance stored in some variable (like $myobject). I want to save this instance into another variable (like $tempobject). I thought, this will be the way: $myobject

Re: [PHP] Object Reference Serialization

2002-05-03 Thread Adam Langley
No worries...I just realized that my object never repopulated the underlying classes with previous object references...Thanks guys, but I see my problem now... Cheers. Adam Langley. "Thies C. Arntzen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Fri, M

Re: [PHP] Object Reference Serialization

2002-05-03 Thread Adam Langley
OK, heres all the code... I have a BoundForm class, a BoundFormPage class, and a BoundTextField... I create a BoundForm, add a BoundFormPage object to it, then add a BoundTextField to the BoundFormPagethen I add the root node (the BoundForm) to the SESSION... The Form, and Page survive seri

Re: [PHP] Object Reference Serialization

2002-05-02 Thread Thies C. Arntzen
On Fri, May 03, 2002 at 12:34:01AM +1200, Adam Langley wrote: > Hi everyone, > > Im trying to store an object which contains an associative array of classes, > each of which contains an array of classes, so a 3-tier hierachy, in the > session object. However, the final tier gets lost upon > seria

[PHP] Object Reference Serialization

2002-05-02 Thread Adam Langley
Hi everyone, Im trying to store an object which contains an associative array of classes, each of which contains an array of classes, so a 3-tier hierachy, in the session object. However, the final tier gets lost upon serialization/deserialization, why is this and how can I prevent this from happ

Re: [PHP] Object reference

2002-03-21 Thread Lucijan
> Use & to reference one variable to another! > $b =& $a; Thanks. Lucijan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Object reference

2002-03-21 Thread Stampe, Lars
Hi, Use & to reference one variable to another! $b =& $a; Lars -Original Message- From: Lucijan [mailto:[EMAIL PROTECTED]] Sent: 21 March 2002 10:20 To: [EMAIL PROTECTED] Subject: [PHP] Object reference I can't understand why this works like it does. class MyObj

[PHP] Object reference

2002-03-21 Thread Lucijan
I can't understand why this works like it does. class MyObj { var $Name; function MyObj($Name) { $this->Name = $Name; } } $a = new MyObj('MyObjName'); $b = $a; $b->Name = 'NoName'; echo $a->Name; Last line will output 'MyObjName' instead of 'NoName' (like I was expecting) I'd expect $a