mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-28 22:54:12 +01:00
Package operations: 2 installs, 23 updates, 0 removals - Updating psr/log (1.1.0 => 1.1.2) - Updating symfony/debug (v3.4.30 => v3.4.35) - Updating symfony/console (v3.4.30 => v3.4.35) - Updating symfony/dotenv (v3.4.30 => v3.4.35) - Updating symfony/routing (v3.4.30 => v3.4.35) - Updating symfony/finder (v3.4.30 => v3.4.35) - Updating symfony/filesystem (v3.4.30 => v3.4.35) - Installing symfony/polyfill-util (v1.12.0) - Installing symfony/polyfill-php56 (v1.12.0) - Updating symfony/http-foundation (v3.4.30 => v3.4.35) - Updating symfony/event-dispatcher (v3.4.30 => v3.4.35) - Updating symfony/http-kernel (v3.4.30 => v3.4.35) - Updating symfony/config (v3.4.30 => v3.4.35) - Updating symfony/dependency-injection (v3.4.30 => v3.4.35) - Updating symfony/class-loader (v3.4.30 => v3.4.35) - Updating symfony/cache (v3.4.30 => v3.4.35) - Updating symfony/framework-bundle (v3.4.30 => v3.4.35) - Updating twig/twig (v1.42.2 => v1.42.4) - Updating symfony/twig-bridge (v3.4.30 => v3.4.35) - Updating symfony/twig-bundle (v3.4.30 => v3.4.35) - Updating symfony/yaml (v3.4.30 => v3.4.35) - Updating symfony/stopwatch (v3.4.30 => v3.4.35) - Updating symfony/var-dumper (v3.4.30 => v3.4.35) - Updating symfony/web-profiler-bundle (v3.4.30 => v3.4.35) - Updating symfony/css-selector (v3.4.30 => v3.4.35)
102 lines
2.3 KiB
PHP
102 lines
2.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Symfony package.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy;
|
|
|
|
/**
|
|
* @author Drak <drak@zikula.org>
|
|
*/
|
|
class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface
|
|
{
|
|
protected $handler;
|
|
|
|
public function __construct(\SessionHandlerInterface $handler)
|
|
{
|
|
$this->handler = $handler;
|
|
$this->wrapper = ($handler instanceof \SessionHandler);
|
|
$this->saveHandlerName = $this->wrapper ? ini_get('session.save_handler') : 'user';
|
|
}
|
|
|
|
/**
|
|
* @return \SessionHandlerInterface
|
|
*/
|
|
public function getHandler()
|
|
{
|
|
return $this->handler;
|
|
}
|
|
|
|
// \SessionHandlerInterface
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function open($savePath, $sessionName)
|
|
{
|
|
return (bool) $this->handler->open($savePath, $sessionName);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function close()
|
|
{
|
|
return (bool) $this->handler->close();
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function read($sessionId)
|
|
{
|
|
return (string) $this->handler->read($sessionId);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function write($sessionId, $data)
|
|
{
|
|
return (bool) $this->handler->write($sessionId, $data);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function destroy($sessionId)
|
|
{
|
|
return (bool) $this->handler->destroy($sessionId);
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function gc($maxlifetime)
|
|
{
|
|
return (bool) $this->handler->gc($maxlifetime);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function validateId($sessionId)
|
|
{
|
|
return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function updateTimestamp($sessionId, $data)
|
|
{
|
|
return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data);
|
|
}
|
|
}
|