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 __construct( yii\web\Session $session ): mixed | ||
| $session | yii\web\Session | |
public function __construct(Session $session)
{
$this->_session = $session;
}
| public destroy( mixed $id ): boolean | ||
| $id | mixed | |
public function destroy($id): bool
{
return $this->_session->destroySession($id);
}
| public gc( mixed $max_lifetime ): mixed | ||
| $max_lifetime | mixed | |
#[\ReturnTypeWillChange]
public function gc($max_lifetime)
{
return $this->_session->gcSession($max_lifetime);
}
| public open( mixed $path, mixed $name ): boolean | ||
| $path | mixed | |
| $name | mixed | |
public function open($path, $name): bool
{
return $this->_session->openSession($path, $name);
}
Signup or Login in order to comment.