SymfonyComponentHttpFoundationSessionStorageHandlerMemcacheSessionHandler

MemcacheSessionHandler.

Summary

No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
N/A
File
vendorSymfonyComponentHttpFoundationSessionStorageHandlerMemcacheSessionHandler.php
Package
Default
Class hierarchy
SymfonyComponentHttpFoundationSessionStorageHandlerMemcacheSessionHandler
Implements
SessionHandlerInterface

Tags

author

Drak drak@zikula.org

Properties

$memcache

$memcache : \Memcache

Type

Memcache — Memcache driver.

Tags

None found

$ttl

$ttl : integer

Type

integer — Time to live in seconds

Tags

None found

$prefix

$prefix : string

Type

string — Key prefix for shared environments.

Tags

None found

Methods

__construct()

__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 $memcache

A Memcache instance

array $options

An associative array of Memcache options

Throws

InvalidArgumentException

When unsupported options are passed

Tags

None found

open()

open(string  $savePath, string  $sessionName) : boolean

Open session.

Parameters

string $savePath

Save path.

string $sessionName

Session Name.

Returns

boolean

Tags

None found

close()

close() : boolean

Close session.

Returns

boolean

Tags

None found

read()

read(string  $sessionId) : string

Read session.

Parameters

string $sessionId

Returns

string —

String as stored in persistent storage or empty string in all other cases.

Tags

None found

write()

write(string  $sessionId, string  $data) : boolean

Commit session to storage.

Parameters

string $sessionId

Session ID.

string $data

Session serialized data to save.

Returns

boolean

Tags

None found

destroy()

destroy(string  $sessionId) : boolean

Destroys this session.

Parameters

string $sessionId

Session ID.

Returns

boolean

Tags

None found

gc()

gc(integer  $lifetime) : boolean

Garbage collection for storage.

Parameters

integer $lifetime

Max lifetime in seconds to keep sessions stored.

Returns

boolean

Tags

None found