[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of the Symfony package. 5 * 6 * (c) Fabien Potencier <fabien@symfony.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12 namespace Symfony\Component\HttpFoundation\Session\Storage; 13 14 /** 15 * Allows session to be started by PHP and managed by Symfony. 16 * 17 * @author Drak <drak@zikula.org> 18 */ 19 class PhpBridgeSessionStorage extends NativeSessionStorage 20 { 21 /** 22 * @param \SessionHandlerInterface|null $handler 23 * @param MetadataBag $metaBag MetadataBag 24 */ 25 public function __construct($handler = null, MetadataBag $metaBag = null) 26 { 27 if (!\extension_loaded('session')) { 28 throw new \LogicException('PHP extension "session" is required.'); 29 } 30 31 $this->setMetadataBag($metaBag); 32 $this->setSaveHandler($handler); 33 } 34 35 /** 36 * {@inheritdoc} 37 */ 38 public function start() 39 { 40 if ($this->started) { 41 return true; 42 } 43 44 $this->loadSession(); 45 46 return true; 47 } 48 49 /** 50 * {@inheritdoc} 51 */ 52 public function clear() 53 { 54 // clear out the bags and nothing else that may be set 55 // since the purpose of this driver is to share a handler 56 foreach ($this->bags as $bag) { 57 $bag->clear(); 58 } 59 60 // reconnect the bags to the session 61 $this->loadSession(); 62 } 63 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |