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 |
SessionStorageInterface.php
001 <?php
002
003 /*
004 * This file is part of the Symfony package.
005 *
006 * (c) Fabien Potencier <fabien@symfony.com>
007 *
008 * For the full copyright and license information, please view the LICENSE
009 * file that was distributed with this source code.
010 */
011
012 namespace Symfony\Component\HttpFoundation\Session\Storage;
013
014 use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
015
016 /**
017 * StorageInterface.
018 *
019 * @author Fabien Potencier <fabien@symfony.com>
020 * @author Drak <drak@zikula.org>
021 *
022 * @api
023 */
024 interface SessionStorageInterface
025 {
026 /**
027 * Starts the session.
028 *
029 * @throws \RuntimeException If something goes wrong starting the session.
030 *
031 * @return bool True if started.
032 *
033 * @api
034 */
035 public function start();
036
037 /**
038 * Checks if the session is started.
039 *
040 * @return bool True if started, false otherwise.
041 */
042 public function isStarted();
043
044 /**
045 * Returns the session ID
046 *
047 * @return string The session ID or empty.
048 *
049 * @api
050 */
051 public function getId();
052
053 /**
054 * Sets the session ID
055 *
056 * @param string $id
057 *
058 * @api
059 */
060 public function setId($id);
061
062 /**
063 * Returns the session name
064 *
065 * @return mixed The session name.
066 *
067 * @api
068 */
069 public function getName();
070
071 /**
072 * Sets the session name
073 *
074 * @param string $name
075 *
076 * @api
077 */
078 public function setName($name);
079
080 /**
081 * Regenerates id that represents this storage.
082 *
083 * This method must invoke session_regenerate_id($destroy) unless
084 * this interface is used for a storage object designed for unit
085 * or functional testing where a real PHP session would interfere
086 * with testing.
087 *
088 * Note regenerate+destroy should not clear the session data in memory
089 * only delete the session data from persistent storage.
090 *
091 * @param bool $destroy Destroy session when regenerating?
092 * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
093 * will leave the system settings unchanged, 0 sets the cookie
094 * to expire with browser session. Time is in seconds, and is
095 * not a Unix timestamp.
096 *
097 * @return bool True if session regenerated, false if error
098 *
099 * @throws \RuntimeException If an error occurs while regenerating this storage
100 *
101 * @api
102 */
103 public function regenerate($destroy = false, $lifetime = null);
104
105 /**
106 * Force the session to be saved and closed.
107 *
108 * This method must invoke session_write_close() unless this interface is
109 * used for a storage object design for unit or functional testing where
110 * a real PHP session would interfere with testing, in which case it
111 * it should actually persist the session data if required.
112 *
113 * @throws \RuntimeException If the session is saved without being started, or if the session
114 * is already closed.
115 */
116 public function save();
117
118 /**
119 * Clear all session data in memory.
120 */
121 public function clear();
122
123 /**
124 * Gets a SessionBagInterface by name.
125 *
126 * @param string $name
127 *
128 * @return SessionBagInterface
129 *
130 * @throws \InvalidArgumentException If the bag does not exist
131 */
132 public function getBag($name);
133
134 /**
135 * Registers a SessionBagInterface for use.
136 *
137 * @param SessionBagInterface $bag
138 */
139 public function registerBag(SessionBagInterface $bag);
140
141 /**
142 * @return MetadataBag
143 */
144 public function getMetadataBag();
145 }
146