[ Index ] |
PHP Cross Reference of phpBB-3.2.11-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 use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; 15 use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; 16 17 /** 18 * Allows session to be started by PHP and managed by Symfony. 19 * 20 * @author Drak <drak@zikula.org> 21 */ 22 class PhpBridgeSessionStorage extends NativeSessionStorage 23 { 24 /** 25 * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler 26 * @param MetadataBag $metaBag MetadataBag 27 */ 28 public function __construct($handler = null, MetadataBag $metaBag = null) 29 { 30 $this->setMetadataBag($metaBag); 31 $this->setSaveHandler($handler); 32 } 33 34 /** 35 * {@inheritdoc} 36 */ 37 public function start() 38 { 39 if ($this->started) { 40 return true; 41 } 42 43 $this->loadSession(); 44 if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) { 45 // This condition matches only PHP 5.3 + internal save handlers 46 $this->saveHandler->setActive(true); 47 } 48 49 return true; 50 } 51 52 /** 53 * {@inheritdoc} 54 */ 55 public function clear() 56 { 57 // clear out the bags and nothing else that may be set 58 // since the purpose of this driver is to share a handler 59 foreach ($this->bags as $bag) { 60 $bag->clear(); 61 } 62 63 // reconnect the bags to the session 64 $this->loadSession(); 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |