Methods summary
public
|
#
__construct( Memcache $memcache, array $options = array() )
Constructor.
List of available options: * prefix: The prefix to use for the memcache keys in order to avoid collision * expiretime: The time to live in seconds
Parameters
- $memcache
- A \Memcache instance
- $options
- An associative array of Memcache options
Throws
|
public
boolean
|
#
open( string $savePath, string $sessionName )
Re-initializes existing session, or creates a new one.
Re-initializes existing session, or creates a new one.
Parameters
- $savePath
- Save path
- $sessionName
- Session name, see http://php.net/function.session-name.php
Returns
boolean true on success, false on failure
Implementation of
|
public
boolean
|
#
close( )
Closes the current session.
Closes the current session.
Returns
boolean true on success, false on failure
Implementation of
|
public
string
|
#
read( string $sessionId )
Reads the session data.
Parameters
- $sessionId
- Session ID, see http://php.net/function.session-id
Returns
string Same session data as passed in write() or empty string when non-existent or on failure
Implementation of
|
public
boolean
|
#
write( string $sessionId, string $data )
Writes the session data to the storage.
Writes the session data to the storage.
Parameters
- $sessionId
- Session ID , see http://php.net/function.session-id
- $data
- Serialized session data to save
Returns
boolean true on success, false on failure
Implementation of
|
public
boolean
|
#
destroy( string $sessionId )
Destroys a session.
Parameters
- $sessionId
- Session ID, see http://php.net/function.session-id
Returns
boolean true on success, false on failure
Implementation of
|
public
boolean
|
#
gc( string|integer $maxlifetime )
Cleans up expired sessions (garbage collection).
Cleans up expired sessions (garbage collection).
Parameters
- $maxlifetime
- Sessions that have not updated for the last maxlifetime seconds will be removed
Returns
boolean true on success, false on failure
Implementation of
|
protected
Memcache
|
#
getMemcache( )
Return a Memcache instance
Return a Memcache instance
Returns
|