Edit report at https://bugs.php.net/bug.php?id=60551&edit=1
ID: 60551 Updated by: frozenf...@php.net Reported by: wiltave at gmail dot com Summary: session_set_save_handler should support a core's session handler interface -Status: To be documented +Status: Assigned Type: Feature/Change Request Package: Session related Operating System: Any PHP Version: Irrelevant -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-01-04 01:18:40] ar...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. session_set_save_handler() now takes a SessionHandlerInterface, which SessionHandler implements. ------------------------------------------------------------------------ [2012-01-04 01:16:18] ar...@php.net Automatic comment from SVN on behalf of arpad Revision: http://svn.php.net/viewvc/?view=revision&revision=321738 Log: add SessionHandlerInterface for session_set_save_handler() - #60551 ------------------------------------------------------------------------ [2011-12-17 18:15:13] cataphr...@php.net Already implemented in PHP 5.4. ------------------------------------------------------------------------ [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