Re: [PHP4BETA] unserialize data members to join extisting object, not possible?
| From: | thies at digicol dot de | Date: | Mon, 15 May 2000 08:25:16 +0000 |
| Subject: | Re: [PHP4BETA] unserialize data members to join extisting object, not possible? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15024@lists.php.net to get a copy of this message | ||
On Mon, May 15, 2000 at 12:26:51AM +0200, waldschrott wrote:
> I played around with all the new OOP functionality and serialized an
> whole object and wrote it to disk. Later then I wanted to join it to
> with an object of the same class to be able to access its methods and
> have it filled with data what should result in a full restoration of the
> state when I wrote the serialized object to disk.
> But I did not find any way to do this.
> Isn´t that possible?
you can use __sleep and __wakeup calls in your class that
help you when serializing resources and DB connections. see
attached sample.
>
> regards
>
>
> --
> o----------0-¬---------O-·---¬----o---®-----o o O ° .
> | http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤
> ° ·
>
> 0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ °
> o © ° . ·
> | psychedelic experience | gott@kiffen.de | O ° o °
> o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·
>
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany
Attachment: [application/x-httpd-php] sleep.php
Attachment: [application/x-httpd-php] sleep.php