12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace Symfony\Component\HttpFoundation\Session\Storage;
- use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
- class PhpBridgeSessionStorage extends NativeSessionStorage
- {
-
- public function __construct($handler = null, ?MetadataBag $metaBag = null)
- {
- if (!\extension_loaded('session')) {
- throw new \LogicException('PHP extension "session" is required.');
- }
- $this->setMetadataBag($metaBag);
- $this->setSaveHandler($handler);
- }
-
- public function start()
- {
- if ($this->started) {
- return true;
- }
- $this->loadSession();
- return true;
- }
-
- public function clear()
- {
-
-
- foreach ($this->bags as $bag) {
- $bag->clear();
- }
-
- $this->loadSession();
- }
- }
|