On Fri, Nov 27, 2009 at 11:57 AM, Lukas Kahwe Smith <[email protected]>wrote:
>
> sounds useful. i assume with this i could extend for example the session
> handler that comes with the Memcached extension? could you provide a code
> example of how that would look like?
>
Right, the SessionHandler class represents the current save handler,
whichever it is. Here's a minimal example:
<?php
class MySession extends SessionHandler {
public static function read($id) {
echo "hi!";
return parent::read($id);
}
}
session_set_save_handler('MySession');
session_start();
?>
There's a few more examples in the phpt in the patch.
Regards,
Arpad