Class

ezpSessionHandlerSymfony

class ezpSessionHandlerSymfony extends ezpSessionHandler

Symfony session handler.

Basically, it let Symfony manage the session and call the Symfony session storage when needed for very specific operation.

Methods

__construct(bool $userHasCookie = false)

__construct

from ezpSessionHandler
bool isConnected()

Checks if session handler is connected with backend.

from ezpSessionHandler
bool setSaveHandler()

reimp.

bool open(string $savePath, string $sessionName)

Session open handler

from ezpSessionHandler
bool close()

Session close handler

from ezpSessionHandler
string|false read(string $sessionId)

Session read handler

bool write(string $sessionId, string $sessionData)

Session write handler

bool destroy(string $sessionId)

Session destroy handler Callback: "destroy_[pre|post]" eZDB $db string $sessionId string $escKey

bool regenerate(bool $updateBackendData = true)

Regenerate session id Callback (when $updateBackendData is true): "regenerate_[pre|post]" eZDB $db string $escNewKey string $escOldKey int $escUserID

bool gc(int $maxLifeTime)

Session gc (garbageCollector) handler Callback: "gc_[pre|post]" eZDB $db int $maxLifeTime

bool cleanup()

Remove all session data Callback: "cleanup_[pre|post]" eZDB $db

deleteByUserIDs(array $userIDArray)

Remove all session data for a specific user

static int count()

Counts the number of session and returns it.

static bool hasBackendAccess()

Signals that handler has direct access to backend, thus is cable of supporting features like gc, cleanup, delete & count.

static bool dbRequired()

Signals that handler requires db instance

bool sessionStart()

Let Symfony starts the session

setStorage(SessionStorageInterface $storage)

Set the storage handler defined in Symfony.

Details

in ezpSessionHandler at line 31
public __construct(bool $userHasCookie = false)

__construct

Parameters

bool $userHasCookie

in ezpSessionHandler at line 41
public bool isConnected()

Checks if session handler is connected with backend.

Return Value

bool

at line 29
public bool setSaveHandler()

reimp.

Does not do anything to let Symfony manage the session handling

Return Value

bool

in ezpSessionHandler at line 72
public bool open(string $savePath, string $sessionName)

Session open handler

Parameters

string $savePath
string $sessionName

Return Value

bool

in ezpSessionHandler at line 82
public bool close()

Session close handler

Return Value

bool

at line 36
public string|false read(string $sessionId)

Session read handler

Parameters

string $sessionId

Return Value

string|false Binary session data

at line 41
public bool write(string $sessionId, string $sessionData)

Session write handler

Parameters

string $sessionId
string $sessionData Binary session data

Return Value

bool

at line 46
public bool destroy(string $sessionId)

Session destroy handler Callback: "destroy_[pre|post]" eZDB $db string $sessionId string $escKey

Parameters

string $sessionId

Return Value

bool

at line 62
public bool regenerate(bool $updateBackendData = true)

Regenerate session id Callback (when $updateBackendData is true): "regenerate_[pre|post]" eZDB $db string $escNewKey string $escOldKey int $escUserID

Parameters

bool $updateBackendData True if we want to keep session data with the new session id

Return Value

bool

at line 87
public bool gc(int $maxLifeTime)

Session gc (garbageCollector) handler Callback: "gc_[pre|post]" eZDB $db int $maxLifeTime

Parameters

int $maxLifeTime In seconds

Return Value

bool

at line 106
public bool cleanup()

Remove all session data Callback: "cleanup_[pre|post]" eZDB $db

Return Value

bool

at line 111
public deleteByUserIDs(array $userIDArray)

Remove all session data for a specific user

Parameters

array $userIDArray

at line 115
static public int count()

Counts the number of session and returns it.

Return Value

int Returns -1 if handler does not support this.

at line 120
static public bool hasBackendAccess()

Signals that handler has direct access to backend, thus is cable of supporting features like gc, cleanup, delete & count.

Return Value

bool

at line 125
static public bool dbRequired()

Signals that handler requires db instance

Return Value

bool

at line 145
public bool sessionStart()

Let Symfony starts the session

Return Value

bool

at line 135
public setStorage(SessionStorageInterface $storage)

Set the storage handler defined in Symfony.

Parameters

SessionStorageInterface $storage