Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 |
SessionBagProxy.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;
13
14 /**
15 * @author Nicolas Grekas <p@tchwork.com>
16 *
17 * @internal
18 */
19 final class SessionBagProxy implements SessionBagInterface
20 {
21 private $bag;
22 private $data;
23 private $usageIndex;
24
25 public function __construct(SessionBagInterface $bag, array &$data, &$usageIndex)
26 {
27 $this->bag = $bag;
28 $this->data = &$data;
29 $this->usageIndex = &$usageIndex;
30 }
31
32 /**
33 * @return SessionBagInterface
34 */
35 public function getBag()
36 {
37 ++$this->usageIndex;
38
39 return $this->bag;
40 }
41
42 /**
43 * @return bool
44 */
45 public function isEmpty()
46 {
47 if (!isset($this->data[$this->bag->getStorageKey()])) {
48 return true;
49 }
50 ++$this->usageIndex;
51
52 return empty($this->data[$this->bag->getStorageKey()]);
53 }
54
55 /**
56 * {@inheritdoc}
57 */
58 public function getName()
59 {
60 return $this->bag->getName();
61 }
62
63 /**
64 * {@inheritdoc}
65 */
66 public function initialize(array &$array)
67 {
68 ++$this->usageIndex;
69 $this->data[$this->bag->getStorageKey()] = &$array;
70
71 $this->bag->initialize($array);
72 }
73
74 /**
75 * {@inheritdoc}
76 */
77 public function getStorageKey()
78 {
79 return $this->bag->getStorageKey();
80 }
81
82 /**
83 * {@inheritdoc}
84 */
85 public function clear()
86 {
87 return $this->bag->clear();
88 }
89 }
90