0 follower

Class yii\web\SessionHandler

Inheritanceyii\web\SessionHandler
ImplementsSessionHandlerInterface
Available since version2.0.52
Source Code https://github.com/yiisoft/yii2/blob/master/framework/web/SessionHandler.php

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

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( yii\web\Session $session )
$session yii\web\Session

                public function __construct(Session $session)
{
    $this->_session = $session;
}

            
close() public method

public boolean close ( )

                public function close(): bool
{
    return $this->_session->closeSession();
}

            
destroy() public method

public boolean destroy ( mixed $id )
$id mixed

                public function destroy($id): bool
{
    return $this->_session->destroySession($id);
}

            
gc() public method

public mixed gc ( mixed $max_lifetime )
$max_lifetime mixed

                #[\ReturnTypeWillChange]
public function gc($max_lifetime)
{
    return $this->_session->gcSession($max_lifetime);
}

            
open() public method

public boolean open ( mixed $path, mixed $name )
$path mixed
$name mixed

                public function open($path, $name): bool
{
    return $this->_session->openSession($path, $name);
}

            
read() public method

public mixed read ( mixed $id )
$id mixed

                #[\ReturnTypeWillChange]
public function read($id)
{
    return $this->_session->readSession($id);
}

            
write() public method

public boolean write ( mixed $id, mixed $data )
$id mixed
$data mixed

                public function write($id, $data): bool
{
    return $this->_session->writeSession($id, $data);
}