class FileSessionHandler implements SessionHandlerInterface (View source)

Properties

protected Filesystem $files

The filesystem instance.

protected string $path

The path where sessions should be stored.

protected int $minutes

The number of minutes the session should be valid.

Methods

void
__construct(Filesystem $files, string $path, int $minutes)

Create a new file driven handler instance.

bool
open($savePath, $sessionName)

{@inheritdoc}

bool
close()

{@inheritdoc}

string|false
read($sessionId)

{@inheritdoc}

bool
write($sessionId, $data)

{@inheritdoc}

bool
destroy($sessionId)

{@inheritdoc}

int
gc($lifetime)

{@inheritdoc}

Details

void __construct(Filesystem $files, string $path, int $minutes)

Create a new file driven handler instance.

Parameters

Filesystem $files
string $path
int $minutes

Return Value

void

bool open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

Return Value

bool

bool close()

{@inheritdoc}

Return Value

bool

string|false read($sessionId)

{@inheritdoc}

Parameters

$sessionId

Return Value

string|false

bool write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

Return Value

bool

bool destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

Return Value

bool

int gc($lifetime)

{@inheritdoc}

Parameters

$lifetime

Return Value

int