> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 3:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: issues with __sleep() and __wakeup()
>
>
> > class Scott {
> > var $svar = array(); // free-form hash for whatever data
> > function Scott( )
> > {
> > return $this;
>
> Like, I don't think you're supposed to return $this from your constructor...
thanks for letting me know, it's an outdated habit from perl...
> > }
> > function __sleep()
> > {
>
> According to the manual, this is supposed to return an array of the variable
> names you want serialized.
>
> return(array('svar'));
so it seems that there's no way to specify *all* my
variables without naming them explicitly in __sleep() ?
> in this case, I think, would be what you want...
>
> > }
> > function __wakeup()
> > {
> > $this->svar['sleep'] = "I am waking up";
> > }
> > }// end class
>
> Once you get it working, post your sample to the User Contributed notes
> please :-)
i definately will.
thanks for the suggestions everyone.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]