Re: Re: Sessions and Objects

From: Date: Sun, 18 Jun 2000 17:43:45 +0000
Subject: Re: Re: Sessions and Objects
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2163@lists.php.net to get a copy of this message
S>> Would everyone rather see S>> 1) No autoloading of classes. You call $php_var = S>> php_load_class("class_name"); And? Just drop them from the session? But somehow mgically guess they are here with all the data when saving the session? Don't see how it might work. S>> 2) Autoloading of classes with the same name? ie, if you register your S>> class as "foo" then S>> you'll always have "foo" available (including methods). S>> You mean dropping all the PHP code which could be in the class in session? How'd you do that? Where'd you take those methods from? PHP has variable for serialization, not all the class tree. S>> Option #1 I put up there simply because if you have (somewhere) 100 classes S>> registered S>> to the session but you're not using 99 of them then you keep speed up Why do you carry them along then? That's like putting in you bag 50 kilos of things "just because somewhere in my life I might need them" and then compaining to bag manufacturer that bag's too heavy and unconvenient to carry along. Session variables are those needed in every session, if you need something once a time, store it in SQL database or whatever storage you like and fetch it when you need it. Doing otherwise means abusing sessions mechanism - and paying for this. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.general (#2163) next »