-=Design change request=-

From: Date: Tue, 13 Jun 2000 04:59:34 +0000
Subject: -=Design change request=-
Groups: php.general 
Request: Send a blank email to php-general+get-1690@lists.php.net to get a copy of this message
Do not auto-load session-registered classes. Period. Right now they're autoloaded and do not have access to the methods. If you want to access saved classes, you can do this somewhere... session_register("some_class"); and later... if (session_is_registered("some_class")) { $object = new class_myObject("some_class"); } else { $object = new class_myObject; } This'll give you a new instance with access to the saved data (and methods!) It'd take an overload of the constructor to do it, but it'd keep the namespace cleaner, and allow for nice access to the data. Right now you can access $some_class directly, but for data only (no methods.) If you "new" another class, then you'll have to copy that data in (and use a different name or you'll lose your saved data), and try to manipulate it with this "layer" in the way. Right now it looks like I'll have to "new" each one, then copy the data in..but then it's a copy. I now have access to a copy of the data but not to the saved stuff. Hacky. All I want is a nice clean way to keep the object's functions and data together. Saving classes in sessions needs to be revamped BADLY. -Szii "Are you tiring of me yet? =P"

« previous php.general (#1690) next »