Files
swiftadmin/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php

65 lines
1.2 KiB
PHP
Raw Normal View History

2022-08-19 19:48:37 +08:00
<?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\Handler;
/**
* Can be used in unit testing or in a situations where persisted sessions are not desired.
*
* @author Drak <drak@zikula.org>
*/
class NullSessionHandler extends AbstractSessionHandler
{
2022-11-28 19:11:12 +08:00
public function close(): bool
2022-08-19 19:48:37 +08:00
{
return true;
}
2022-11-28 19:11:12 +08:00
public function validateId(string $sessionId): bool
2022-08-19 19:48:37 +08:00
{
return true;
}
/**
* {@inheritdoc}
*/
2022-11-28 19:11:12 +08:00
protected function doRead(string $sessionId): string
2022-08-19 19:48:37 +08:00
{
return '';
}
2022-11-28 19:11:12 +08:00
public function updateTimestamp(string $sessionId, string $data): bool
2022-08-19 19:48:37 +08:00
{
return true;
}
/**
* {@inheritdoc}
*/
2022-11-28 19:11:12 +08:00
protected function doWrite(string $sessionId, string $data): bool
2022-08-19 19:48:37 +08:00
{
return true;
}
/**
* {@inheritdoc}
*/
2022-11-28 19:11:12 +08:00
protected function doDestroy(string $sessionId): bool
2022-08-19 19:48:37 +08:00
{
return true;
}
2022-11-28 19:11:12 +08:00
public function gc(int $maxlifetime): int|false
2022-08-19 19:48:37 +08:00
{
return 0;
}
}