芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/framework/src/Illuminate/Session/ArraySessionHandler.php
minutes = $minutes; } /** * {@inheritdoc} */ public function open($savePath, $sessionName) { return true; } /** * {@inheritdoc} */ public function close() { return true; } /** * {@inheritdoc} */ 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} */ public function write($sessionId, $data) { $this->storage[$sessionId] = [ 'data' => $data, 'time' => $this->currentTime(), ]; return true; } /** * {@inheritdoc} */ public function destroy($sessionId) { if (isset($this->storage[$sessionId])) { unset($this->storage[$sessionId]); } return true; } /** * {@inheritdoc} */ 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; } }