RE: [PHP-GENERAL] Re: [PHP-DEV] RE: [PHP-GENERAL] Re: [PHP-DEV] S essions and Objects
| From: | Millaway, John | Date: | Mon, 19 Jun 2000 14:37:47 +0000 |
| Subject: | RE: [PHP-GENERAL] Re: [PHP-DEV] RE: [PHP-GENERAL] Re: [PHP-DEV] S essions and Objects | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2195@lists.php.net to get a copy of this message | ||
>
> Let me ask you then, what exactly do you want to see improved?
>
1. References are lost during serialization. Example:
class UserInfo {
var $firstname, $fname;
function UserInfo() {
$fname = &$firstname; // Create reference
}
}
The alias "fname" will not work correctly in the
next page request.
2. Notification of session events. Ideally, an
object which has been deserialized would be
notified of this, either externally through
a registered callback, or introspectively by
calling an object's "onDeserialization()"
method.
3. Per-object serialization. PHP's introspection
functionality is powerful enough to detect if an
object has a "[de]serialize()" method, for example.
If so, the object can provide it's own
[de]serialization. It would be nice if the session
handler could do this automatically.
-John