Req #60551 [Dup->]: session_set_save_handler should support a core's session handler interface
| From: | arpad@php.net | Date: | Wed, 04 Jan 2012 01:18:40 +0000 |
| Subject: | Req #60551 [Dup->]: session_set_save_handler should support a core's session handler interface | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166196@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60551&edit=1
ID: 60551
Updated by: arpad@php.net
Reported by: wiltave at gmail dot com
Summary: session_set_save_handler should support a core's
session handler interface
-Status: Duplicate
+Status: To be documented
Type: Feature/Change Request
Package: Session related
Operating System: Any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2012-01-04 01:16:18] arpad@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] cataphract@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