class JSessionStorageMemcache extends JSessionStorage

Memcache session storage handler for PHP

Methods

__construct( array $options = array())

Constructor

static  JSessionStorage
getInstance( string $name = 'none', array $options = array())

Returns a session storage handler object, only creating it if it doesn't already exist.

void
register()

Register the functions of this class with PHP's session handler

boolean
open( string $save_path, string $session_name)

Open the SessionHandler backend.

boolean
close()

Close the SessionHandler backend.

string
read( string $id)

Read the data for a particular session identifier from the SessionHandler backend.

boolean
write( string $id, string $session_data)

Write session data to the SessionHandler backend.

boolean
destroy( string $id)

Destroy the data for a particular session identifier in the SessionHandler backend.

boolean
gc( integer $maxlifetime = null)

Garbage collect stale sessions from the SessionHandler backend.

static  boolean
isSupported()

Test to see if the SessionHandler is available.

static  boolean
test()

Test to see if the SessionHandler is available.

Details

__construct( array $options = array())

Constructor

Parameters

array $options Optional parameters.

Exceptions

RuntimeException

static JSessionStorage getInstance( string $name = 'none', array $options = array())

Returns a session storage handler object, only creating it if it doesn't already exist.

Parameters

string $name The session store to instantiate
array $options Array of options

Return Value

JSessionStorage

Exceptions

JSessionExceptionUnsupported

void register()

Register the functions of this class with PHP's session handler

Return Value

void

boolean open( string $save_path, string $session_name)

Open the SessionHandler backend.

Parameters

string $save_path The path to the session object.
string $session_name The name of the session.

Return Value

boolean True on success, false otherwise.

boolean close()

Close the SessionHandler backend.

Return Value

boolean True on success, false otherwise.

string read( string $id)

Read the data for a particular session identifier from the SessionHandler backend.

Parameters

string $id The session identifier.

Return Value

string The session data.

boolean write( string $id, string $session_data)

Write session data to the SessionHandler backend.

Parameters

string $id The session identifier.
string $session_data The session data.

Return Value

boolean True on success, false otherwise.

boolean destroy( string $id)

Destroy the data for a particular session identifier in the SessionHandler backend.

Parameters

string $id The session identifier.

Return Value

boolean True on success, false otherwise.

boolean gc( integer $maxlifetime = null)

Garbage collect stale sessions from the SessionHandler backend.

Parameters

integer $maxlifetime The maximum age of a session.

Return Value

boolean True on success, false otherwise.

static boolean isSupported()

Test to see if the SessionHandler is available.

Return Value

boolean True on success, false otherwise.

static boolean test()

Test to see if the SessionHandler is available.

Return Value

boolean True on success, false otherwise.