Class yii\web\SessionHandler
Inheritance | yii\web\SessionHandler |
---|---|
Implements | SessionHandlerInterface |
Available since version | 2.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.
Public Methods
Method Details
public void __construct ( yii\web\Session $session ) | ||
$session |
public function __construct(Session $session)
{
$this->_session = $session;
}
public void destroy ( $id ) | ||
$id |
public function destroy($id): bool
{
return $this->_session->destroySession($id);
}
public void gc ( $max_lifetime ) | ||
$max_lifetime |
#[\ReturnTypeWillChange]
public function gc($max_lifetime)
{
return $this->_session->gcSession($max_lifetime);
}
public void open ( $path, $name ) | ||
$path | ||
$name |
public function open($path, $name): bool
{
return $this->_session->openSession($path, $name);
}
public void read ( $id ) | ||
$id |
#[\ReturnTypeWillChange]
public function read($id)
{
return $this->_session->readSession($id);
}
public void write ( $id, $data ) | ||
$id | ||
$data |
public function write($id, $data): bool
{
return $this->_session->writeSession($id, $data);
}
Signup or Login in order to comment.