[PHP-DEV] [PATCH] session_set_save_handler(class)

2009-11-21 Thread Arpad Ray
Attached is a patch (against HEAD, includes tests) which allows users to extend any session handler in an object oriented fashion. By extending the new internal class SessionHandler, users can wrap or override methods of whatever session handler is in use, or implement a complete custom handler.

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-11-27 Thread Lukas Kahwe Smith
On 22.11.2009, at 06:12, Arpad Ray wrote: > Attached is a patch (against HEAD, includes tests) which allows users to > extend any session handler in an object oriented fashion. > > By extending the new internal class SessionHandler, users can wrap or > override methods of whatever session hand

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-11-27 Thread Arpad Ray
On Fri, Nov 27, 2009 at 11:57 AM, Lukas Kahwe Smith 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 t

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-12-08 Thread Stanislav Malyshev
Hi! By extending the new internal class SessionHandler, users can wrap or override methods of whatever session handler is in use, or implement a complete custom handler. Couple of notes: 1. I'd call mod_active something more clean - like session_active? 2. What happens if session module is se

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-12-09 Thread Arpad Ray
On Wed, Dec 9, 2009 at 2:35 AM, Stanislav Malyshev wrote: > Hi! > > > By extending the new internal class SessionHandler, users can wrap or >> override methods of whatever session handler is in use, or implement a >> complete custom handler. >> > > Hi, Thanks very much for your feedback, I've m

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-12-09 Thread Stanislav Malyshev
Hi! 2. What happens if session module is set to "user" in configuration - what old_mod will be then and how this patch will work? It now raises an error rather than segfaulting if the user module is selected but no handler has been registered. This should really halt execution which it

Re: [PHP-DEV] [PATCH] session_set_save_handler(class)

2009-12-09 Thread Arpad Ray
Hi, On Wed, Dec 9, 2009 at 11:16 PM, Stanislav Malyshev wrote: > It now raises an error rather than segfaulting if the user module is >> selected but no handler has been registered. This should really halt >> execution which it doesn't at the moment but I'll raise that separately. >> > > I'd say