Class

ezpSessionHandlerPHP

class ezpSessionHandlerPHP extends ezpSessionHandler

PHP session handler class Does not register it self as opposed to most other handler, as the point is to let PHP handle most things

Methods

__construct(bool $userHasCookie = false)

__construct

from ezpSessionHandler
bool isConnected()

Checks if session handler is connected with backend.

from ezpSessionHandler
bool setSaveHandler()

reimp (Does nothing, lets php handle sessions) Does set gc_maxlifetime to SessionTimeout to make sure timeout works like DB handler

bool open(string $savePath, string $sessionName)

Session open handler

from ezpSessionHandler
bool close()

Session close handler

from ezpSessionHandler
string|false read(string $sessionId)

reimp (not used in this handler)

bool write(string $sessionId, string $sessionData)

reimp (not used in this handler)

bool destroy(string $sessionId)

reimp (not used in this handler)

bool regenerate(bool $updateBackendData = true)

reimp (Only uses php and callbacks)

bool gc(int $maxLifeTime)

reimp (not used in this handler)

bool cleanup()

reimp (not used in this handler)

deleteByUserIDs(array $userIDArray)

reimp (not used in this handler)

static int count()

Counts the number of session and returns it.

from ezpSessionHandler
static bool hasBackendAccess()

reimp (this handler does not use db)

static bool dbRequired()

reimp (this handler does not use db)

bool sessionStart()

Starts the session.

from ezpSessionHandler

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 24
public bool setSaveHandler()

reimp (Does nothing, lets php handle sessions) Does set gc_maxlifetime to SessionTimeout to make sure timeout works like DB handler

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 39
public string|false read(string $sessionId)

reimp (not used in this handler)

Parameters

string $sessionId

Return Value

string|false Binary session data

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

reimp (not used in this handler)

Parameters

string $sessionId
string $sessionData Binary session data

Return Value

bool

at line 58
public bool destroy(string $sessionId)

reimp (not used in this handler)

So callbacks on this function is not called, this is a known limitation. Either make sure your data does not depend on session id, or make sure it is cleanup in session_gc.php (cronjob).

Parameters

string $sessionId

Return Value

bool

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

reimp (Only uses php and callbacks)

Parameters

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

Return Value

bool

at line 90
public bool gc(int $maxLifeTime)

reimp (not used in this handler)

Parameters

int $maxLifeTime In seconds

Return Value

bool

at line 102
public bool cleanup()

reimp (not used in this handler)

Return Value

bool

at line 114
public deleteByUserIDs(array $userIDArray)

reimp (not used in this handler)

Parameters

array $userIDArray

in ezpSessionHandler at line 161
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 121
static public bool hasBackendAccess()

reimp (this handler does not use db)

Return Value

bool

at line 129
static public bool dbRequired()

reimp (this handler does not use db)

Return Value

bool

in ezpSessionHandler at line 194
public bool sessionStart()

Starts the session.

Override this method if you need to delegate session start to an external system (e.g. Symfony stack in eZ Publish 5)

Return Value

bool