Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
PhpBridgeSessionStorage.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * 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\Proxy\AbstractProxy;
15 use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
16
17 /**
18 * Allows session to be started by PHP and managed by Symfony2
19 *
20 * @author Drak <drak@zikula.org>
21 */
22 class PhpBridgeSessionStorage extends NativeSessionStorage
23 {
24 /**
25 * Constructor.
26 *
27 * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler
28 * @param MetadataBag $metaBag MetadataBag
29 */
30 public function __construct($handler = null, MetadataBag $metaBag = null)
31 {
32 $this->setMetadataBag($metaBag);
33 $this->setSaveHandler($handler);
34 }
35
36 /**
37 * {@inheritdoc}
38 */
39 public function start()
40 {
41 if ($this->started && !$this->closed) {
42 return true;
43 }
44
45 $this->loadSession();
46 if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) {
47 // This condition matches only PHP 5.3 + internal save handlers
48 $this->saveHandler->setActive(true);
49 }
50
51 return true;
52 }
53
54 /**
55 * {@inheritdoc}
56 */
57 public function clear()
58 {
59 // clear out the bags and nothing else that may be set
60 // since the purpose of this driver is to share a handler
61 foreach ($this->bags as $bag) {
62 $bag->clear();
63 }
64
65 // reconnect the bags to the session
66 $this->loadSession();
67 }
68 }
69