Re: [PHP4BETA] Session Variables in classes
| From: | Andrei Zmievski | Date: | Fri, 03 Mar 2000 14:37:05 +0000 |
| Subject: | Re: [PHP4BETA] Session Variables in classes | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11458@lists.php.net to get a copy of this message | ||
On Fri, 03 Mar 2000, Richard Lawley wrote:
> Is it possible to have a class member variable made into a session variable?
> The only way I have been able to implement this so far is to use a global
> variable instead of the class member variable. While this is sufficient for
> my solution where there is only ever one instance of the class on any page,
> I would not know how to do this if I had multiple instances of the class as
> they would all be referring to the same var.
I don't know your situation exactly, but having class var as a session
variable just doesn't strike me as being all that useful. How should the
session know which object to restore your class variable into when
unserializing?
-Andrei
* We reason deeply, when we forcibly feel. *