class MemcachedSessionHandler extends AbstractSessionHandler

Memcached based session storage handler based on the Memcached class provided by the PHP memcached extension.

Methods

open($savePath, $sessionName)

{@inheritdoc}

string
doRead(string $sessionId)

No description

bool
doWrite(string $sessionId, string $data)

No description

bool
doDestroy(string $sessionId)

No description

validateId($sessionId)

{@inheritdoc}

read($sessionId)

{@inheritdoc}

write($sessionId, $data)

{@inheritdoc}

destroy($sessionId)

{@inheritdoc}

__construct(Memcached $memcached, array $options = [])

Constructor.

close()

{@inheritdoc}

updateTimestamp($sessionId, $data)

{@inheritdoc}

gc($maxlifetime)

{@inheritdoc}

Memcached
getMemcached()

Return a Memcached instance.

Details

open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

at line 71
protected string doRead(string $sessionId)

Parameters

string $sessionId

Return Value

string

at line 89
protected bool doWrite(string $sessionId, string $data)

Parameters

string $sessionId
string $data

Return Value

bool

at line 97
protected bool doDestroy(string $sessionId)

Parameters

string $sessionId

Return Value

bool

validateId($sessionId)

{@inheritdoc}

Parameters

$sessionId

read($sessionId)

{@inheritdoc}

Parameters

$sessionId

in AbstractSessionHandler at line 101
write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

in AbstractSessionHandler at line 118
destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

at line 48
__construct(Memcached $memcached, array $options = [])

Constructor.

List of available options: * prefix: The prefix to use for the memcached keys in order to avoid collision * expiretime: The time to live in seconds.

Parameters

Memcached $memcached A \Memcached instance
array $options An associative array of Memcached options

Exceptions

InvalidArgumentException When unsupported options are passed

at line 63
close()

{@inheritdoc}

at line 79
updateTimestamp($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

at line 107
gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime

at line 118
protected Memcached getMemcached()

Return a Memcached instance.

Return Value

Memcached