/var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Session
Edit: /var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Session/ArraySessionHandler.php (2689B)
minutes = $minutes;
}
/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function open($savePath, $sessionName)
{
return true;
}
/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function close()
{
return true;
}
/**
* {@inheritdoc}
*
* @return string|false
*/
#[\ReturnTypeWillChange]
public function read($sessionId)
{
if (! isset($this->storage[$sessionId])) {
return '';
}
$session = $this->storage[$sessionId];
$expiration = $this->calculateExpiration($this->minutes * 60);
if (isset($session['time']) && $session['time'] >= $expiration) {
return $session['data'];
}
return '';
}
/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function write($sessionId, $data)
{
$this->storage[$sessionId] = [
'data' => $data,
'time' => $this->currentTime(),
];
return true;
}
/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function destroy($sessionId)
{
if (isset($this->storage[$sessionId])) {
unset($this->storage[$sessionId]);
}
return true;
}
/**
* {@inheritdoc}
*
* @return int|false
*/
#[\ReturnTypeWillChange]
public function gc($lifetime)
{
$expiration = $this->calculateExpiration($lifetime);
foreach ($this->storage as $sessionId => $session) {
if ($session['time'] < $expiration) {
unset($this->storage[$sessionId]);
}
}
return true;
}
/**
* Get the expiration time of the session.
*
* @param int $seconds
* @return int
*/
protected function calculateExpiration($seconds)
{
return $this->currentTime() - $seconds;
}
}