NativeSessionStorage::setSaveHandler()

setSaveHandler(AbstractProxy|NativeSessionHandler|SessionHandlerInterface|null $saveHandler = null)

Registers session save handler as a PHP session handler.

To use internal PHP session save handlers, override this method using iniset with session.savehandler and session.save_path e.g.

ini_set('session.save_handler', 'files');
ini_set('session.save_path', '/tmp');

or pass in a NativeSessionHandler instance which configures session.save_handler in the constructor, for a template see NativeFileSessionHandler or use handlers in composer package drak/native-session

Parameters

AbstractProxy|NativeSessionHandler|SessionHandlerInterface|null $saveHandler

Exceptions

InvalidArgumentException

See also

http://php.net/session-set-save-handler
http://php.net/sessionhandlerinterface
http://php.net/sessionhandler
http://github.com/drak/NativeSession
doc_Symfony
2016-10-28 06:24:19
Comments
Leave a Comment

Please login to continue.