FileSessionHandler implements SessionHandlerInterface uses BlockSerializationTrait

PHP session handling with "secure" session files (hashed session id) see http://www.php.net/manual/en/function.session-set-save-handler.php

Table of Contents

Interfaces

SessionHandlerInterface

Methods

__construct()  : mixed
__destruct()  : mixed
Writes the session data at the end, to overcome a PHP APC bug.
__wakeup()  : mixed
Deny object deserialization.
close()  : mixed
destroy()  : bool
gc()  : bool
Garbage collect session info. See @session_set_save_handler
getSessionId()  : string|false
Returns the session ID of the running session.
open()  : mixed
read()  : mixed
write()  : mixed

Methods

__construct()

public __construct(string $sessionPath, int $expirationTimeInMinutes) : mixed
Parameters
$sessionPath : string
$expirationTimeInMinutes : int

__destruct()

Writes the session data at the end, to overcome a PHP APC bug.

public __destruct() : mixed

Writes the session data in a proper context that is not affected by the APC bug: http://pecl.php.net/bugs/bug.php?id=16721.

This behaviour was introduced in #17511, where self::write() made use of GeneralUtility which due to the APC bug throws a "Fatal error: Class 'GeneralUtility' not found" (and the session data is not saved). Calling session_write_close() at this point seems to be the most easy solution, according to PHP author.

__wakeup()

Deny object deserialization.

public __wakeup() : mixed

close()

public close() : mixed
Attributes
#[ReturnTypeWillChange]

destroy()

public destroy(mixed $id) : bool
Parameters
$id : mixed
Attributes
#[ReturnTypeWillChange]
Return values
bool

gc()

Garbage collect session info. See @session_set_save_handler

public gc(int $maxLifeTime) : bool
Parameters
$maxLifeTime : int

The setting of session.gc_maxlifetime

Attributes
#[ReturnTypeWillChange]
Return values
bool

getSessionId()

Returns the session ID of the running session.

public getSessionId() : string|false
Return values
string|false

the session ID

open()

public open(mixed $savePath, mixed $sessionName) : mixed
Parameters
$savePath : mixed
$sessionName : mixed
Attributes
#[ReturnTypeWillChange]

read()

public read(mixed $id) : mixed
Parameters
$id : mixed
Attributes
#[ReturnTypeWillChange]

write()

public write(mixed $id, mixed $sessionData) : mixed
Parameters
$id : mixed
$sessionData : mixed
Attributes
#[ReturnTypeWillChange]

        
On this page

Search results