Skip to content
PHP Ecosystem
Explore

SessionHandler

API reference › yii › web › SessionHandler

classyii\web\SessionHandler
ImplementsSessionHandlerInterface
Since2.0.52
Sourceframework/web/SessionHandler.php

SessionHandler implements an SessionHandlerInterface for handling Session with custom session storage.

MethodDescriptionDefined by
__construct()SessionHandler
close()SessionHandler
destroy()SessionHandler
gc()SessionHandler
open()SessionHandler
read()SessionHandler
write()SessionHandler
public function __construct(yii\web\Session $session)

Parameters

ParameterTypeDescription
$sessionSession
public function close(): bool

Returns

bool

public function destroy(mixed $id): bool

Parameters

ParameterTypeDescription
$idmixed

Returns

bool

public function gc(mixed $max_lifetime): mixed

Parameters

ParameterTypeDescription
$max_lifetimemixed

Returns

mixed

public function open(mixed $path, mixed $name): bool

Parameters

ParameterTypeDescription
$pathmixed
$namemixed

Returns

bool

public function read(mixed $id): mixed

Parameters

ParameterTypeDescription
$idmixed

Returns

mixed

public function write(mixed $id, mixed $data): bool

Parameters

ParameterTypeDescription
$idmixed
$datamixed

Returns

bool