Class DatabaseSessionHandler
This class implements SessionHandlerInterface to define a session engine base on database
-
Hawk\DatabaseSessionHandler
implements
SessionHandlerInterface
Methods summary
public
|
#
close( )
Close the session
Implementation of
SessionHandlerInterface::close()
|
public
|
#
destroy( string $sessionId )
Destroy the session
Parameters
- $sessionId
- The session id, corresponding to the session cookie
Implementation of
SessionHandlerInterface::destroy()
|
public
|
#
gc( integer $maxlifetime )
Clean expired sessions
Parameters
- $maxlifetime
- The session lifetime (not used)
Implementation of
SessionHandlerInterface::gc()
|
public
|
#
open( string $savePath, string $name )
Open a new session
Parameters
- $savePath
- Not used
- $name
- The session name (defaulty 'PHPSESSID')
Implementation of
SessionHandlerInterface::open()
|
public
string
|
#
read( string $sessionId )
Read data of a session
Parameters
- $sessionId
- The session id, corresponding to the session cookie
Returns
string The session data, serialized
Implementation of
SessionHandlerInterface::read()
|
public
|
#
write( string $sessionId, string $data )
Write data on the session
Write data on the session
Parameters
- $sessionId
- The session id, corresponding to the session cookie
- $data
- The data session to write, serialized
Implementation of
SessionHandlerInterface::write()
|