Edit report at https://bugs.php.net/bug.php?id=60551&edit=1

 ID:                 60551
 Updated by:         cataphr...@php.net
 Reported by:        wiltave at gmail dot com
 Summary:            session_set_save_handler should support a core's
                     session handler interface
-Status:             Open
+Status:             Duplicate
 Type:               Feature/Change Request
 Package:            Session related
 Operating System:   Any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Already implemented in PHP 5.4.


Previous Comments:
------------------------------------------------------------------------
[2011-12-17 12:16:43] wiltave at gmail dot com

Description:
------------
session_set_save_handler expects callbacks to session handler's operations 
(open, close, etc). It would be great if this function accepts a core's session 
handler interface. Something like:

<?php
interface Session_Handler_Interface {
    function open();
    function close();
    function read();
    function write();
    function destroy();
    function gc();
}

class Some_Handler implements Session_Handler_Interface {
    // implementations ....
}

$handler = new Some_Handler();
session_set_save_handler($handler);

Then, we'll have an OOP approach too. The old one should not be removed.

Thank you.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60551&edit=1

Reply via email to