Re: [PHP4BETA] Session: objects containing objects

From: Date: Fri, 25 Feb 2000 12:32:00 +0000
Subject: Re: [PHP4BETA] Session: objects containing objects
References: 1 2 3 4 5 6 7  Groups: php.version4 
Request: Send a blank email to php-version4+get-10943@lists.php.net to get a copy of this message
On Fri, Feb 25, 2000 at 01:03:07PM +0100, Kristian Köhntopp wrote: > > Boris Erdmann wrote: > > i dont semm to get your point on this: do you want to sess->register > > a *class* (see the code!)? that wont work with PHPLIB and php4 either. > > Registering an object (a class instance) makes it necessary > for the receiving interpreter to know about the class definition, > i.e. to have the code for the methods associated with that > objects class. > > Registering a class can only be done by exporting the > code that compromises the class. This can be done on > source level only in PHP3, as there is no "compiled" > representation for classes. It also requires that a > file contains only the definition of a single class. > There is some session management library other than > PHPLIB which tries to implement such an autoload feature, > but I do not remember the name of that project at the moment. > > In PHP4, registering a class could mean to compile > classes into bytecode and serialize the class by > storing and shipping the bytecode representing that > class. That way, the receiving system imports the > class and can create instances of that class. The > "shipping source" approach from PHP3 is still valid. > > > So the current state of affairs with PHP4 seems to > be: > > - PHP4's serializer is at least en par with the PHPLIB > serializer, obsoleting the Session class in PHPLIB. it's been like this since before the user-group meeting in hamburg. > > - PHP4's serializer and PHPLIB's serializer both require > that the class definitions for all classes that are to > be unserialized are known in the receiving interpreter > at unserialization time. > > - There is no autoload mechanism and no method to serialize > bytecode, so there is no mechanism to serialize classes, > only objects which are (manually) dependent on the > presence of the appropriate object definition. > > This is not perfect, but perfectly acceptable. ;-) thanx > > Kristian > -- > Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH > Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00 > Using PHP3? See our web development library at > http://phplib.netuse.de/ (We have moved! Update your > bookmarks!) > > -- > 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

« previous php.version4 (#10943) next »