class MemcacheHandler extends AbstractHandler (View source)

Class MemcacheHandler

Methods

__construct(Memcache $memcache = null, array $options = array())

Constructor

mixed
register()

register

static boolean
isSupported()

Test to see if the SessionHandler is available.

bool
open(string $savePath, string $sessionName)

open

bool
close()

close

string
read(string $id)

read

bool
write(string $id, string $data)

write

bool
destroy(int $id)

destroy

bool
gc(int $maxlifetime)

gc

Details

at line line 41
__construct(Memcache $memcache = null, array $options = array())

Constructor

Parameters

Memcache $memcache A Memcache instance
array $options

Exceptions

RuntimeException

mixed register()

register

Return Value

mixed

at line line 62
static boolean isSupported()

Test to see if the SessionHandler is available.

Return Value

boolean

at line line 75
bool open(string $savePath, string $sessionName)

open

Parameters

string $savePath The path where to store/retrieve the session.
string $sessionName

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 85
bool close()

close

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 99
string read(string $id)

read

Parameters

string $id The session id to read data for.

Return Value

string Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to PHP for processing.

at line line 112
bool write(string $id, string $data)

write

Parameters

string $id The session id.
string $data The encoded session data. This data is the result of the PHP internally encoding the $_SESSION super global to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 124
bool destroy(int $id)

destroy

Parameters

int $id The session ID being destroyed.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

at line line 136
bool gc(int $maxlifetime)

gc

Parameters

int $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.

Return Value

bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.