Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39936 invoked by uid 1010); 5 Jul 2005 18:48:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39921 invoked from network); 5 Jul 2005 18:48:42 -0000 Received: from unknown (HELO gmail.com) (127.0.0.1) by localhost with SMTP; 5 Jul 2005 18:48:42 -0000 X-Host-Fingerprint: 64.233.184.198 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.198:15768] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 88/57-10426-A06DAC24 for ; Tue, 05 Jul 2005 14:48:42 -0400 Received: by wproxy.gmail.com with SMTP id i25so953148wra for ; Tue, 05 Jul 2005 11:48:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mKW/HKWJMNSy6DlcSccocRU2XO5kH3gKhY01Gi8jrnqpVkmmZdGCD5289nPuZYckus9Vzzf6i6ZxBHJvK1CHCwSSJ+bdrB0zR4q0cSSDFuqilbOrD2SwdfS/3H1JakZ5qDK0xPOmCczx8Uarrnbnn2hRywChtKzJeFohnFTORn4= Received: by 10.54.101.2 with SMTP id y2mr4857861wrb; Tue, 05 Jul 2005 11:48:39 -0700 (PDT) Received: by 10.54.153.5 with HTTP; Tue, 5 Jul 2005 11:48:39 -0700 (PDT) Message-ID: <4e89b42605070511483c91f00@mail.gmail.com> Date: Tue, 5 Jul 2005 14:48:39 -0400 Reply-To: Wez Furlong To: Marcus Boerger Cc: David Olsson , internals@lists.php.net In-Reply-To: <379875860.20050705204152@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <379875860.20050705204152@marcus-boerger.de> Subject: Re: [PHP-DEV] serialize extension objects? From: kingwez@gmail.com (Wez Furlong) I don't think the general list will help David write his extension :) David, right now the only thing you can do is exactly the same as classes you define in PHP scripts. You can provide the magic sleep and wakeup functions to do something more than just have your properties copied and reinstated. --Wez. On 7/5/05, Marcus Boerger wrote: > Hello David, >=20 > wait for PHP 5.1 and use the Serializable interface. Otherwise ask > on the general list for support. >=20 > marcus >=20 > Tuesday, July 5, 2005, 4:16:11 PM, you wrote: >=20 > > I'm writing an extension for PHP 4 (running version 4.3.10) in C/C++. > > The extension provides a set of classes to the PHP programmer (it is, > > hence, object oriented). My problem is that some of the objects (or, > > rather, references to objects) provided by my extension needs to be > > stored in a session and, thus, serialized. I have, however, no idea on > > how to provide a custom serialize function for my objects as the > > built-in one (for obvious reasons) doesn't work. I have had no luck > > finding any useful tips and/or documentation for PHP 4 regarding this > > matter. I sincerely hope that someone could point me in the right direc= tion. >=20 > > Or have I completely misunderstood the entire concept; when storing a > > reference to an object (implemented in C/C++), do the object really hav= e > > to be serialized? Thanks for all tips! :-) >=20 > > Best regards > > David Olsson >=20 >=20 >=20 >=20 > -- > Best regards, > Marcus mailto:mail@marcus-boerger.de >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 >