Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

SessionInterface.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 4.30 KiB


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;
013   
014  use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag;
015   
016  /**
017   * Interface for the session.
018   *
019   * @author Drak <drak@zikula.org>
020   */
021  interface SessionInterface
022  {
023      /**
024       * Starts the session storage.
025       *
026       * @return bool True if session started
027       *
028       * @throws \RuntimeException If session fails to start.
029       */
030      public function start();
031   
032      /**
033       * Returns the session ID.
034       *
035       * @return string The session ID
036       */
037      public function getId();
038   
039      /**
040       * Sets the session ID.
041       *
042       * @param string $id
043       */
044      public function setId($id);
045   
046      /**
047       * Returns the session name.
048       *
049       * @return mixed The session name
050       */
051      public function getName();
052   
053      /**
054       * Sets the session name.
055       *
056       * @param string $name
057       */
058      public function setName($name);
059   
060      /**
061       * Invalidates the current session.
062       *
063       * Clears all session attributes and flashes and regenerates the
064       * session and deletes the old session from persistence.
065       *
066       * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
067       *                      will leave the system settings unchanged, 0 sets the cookie
068       *                      to expire with browser session. Time is in seconds, and is
069       *                      not a Unix timestamp.
070       *
071       * @return bool True if session invalidated, false if error
072       */
073      public function invalidate($lifetime = null);
074   
075      /**
076       * Migrates the current session to a new session id while maintaining all
077       * session attributes.
078       *
079       * @param bool $destroy  Whether to delete the old session or leave it to garbage collection
080       * @param int  $lifetime Sets the cookie lifetime for the session cookie. A null value
081       *                       will leave the system settings unchanged, 0 sets the cookie
082       *                       to expire with browser session. Time is in seconds, and is
083       *                       not a Unix timestamp.
084       *
085       * @return bool True if session migrated, false if error
086       */
087      public function migrate($destroy = false, $lifetime = null);
088   
089      /**
090       * Force the session to be saved and closed.
091       *
092       * This method is generally not required for real sessions as
093       * the session will be automatically saved at the end of
094       * code execution.
095       */
096      public function save();
097   
098      /**
099       * Checks if an attribute is defined.
100       *
101       * @param string $name The attribute name
102       *
103       * @return bool true if the attribute is defined, false otherwise
104       */
105      public function has($name);
106   
107      /**
108       * Returns an attribute.
109       *
110       * @param string $name    The attribute name
111       * @param mixed  $default The default value if not found
112       *
113       * @return mixed
114       */
115      public function get($name, $default = null);
116   
117      /**
118       * Sets an attribute.
119       *
120       * @param string $name
121       * @param mixed  $value
122       */
123      public function set($name, $value);
124   
125      /**
126       * Returns attributes.
127       *
128       * @return array Attributes
129       */
130      public function all();
131   
132      /**
133       * Sets attributes.
134       *
135       * @param array $attributes Attributes
136       */
137      public function replace(array $attributes);
138   
139      /**
140       * Removes an attribute.
141       *
142       * @param string $name
143       *
144       * @return mixed The removed value or null when it does not exist
145       */
146      public function remove($name);
147   
148      /**
149       * Clears all attributes.
150       */
151      public function clear();
152   
153      /**
154       * Checks if the session was started.
155       *
156       * @return bool
157       */
158      public function isStarted();
159   
160      /**
161       * Registers a SessionBagInterface with the session.
162       *
163       * @param SessionBagInterface $bag
164       */
165      public function registerBag(SessionBagInterface $bag);
166   
167      /**
168       * Gets a bag instance by name.
169       *
170       * @param string $name
171       *
172       * @return SessionBagInterface
173       */
174      public function getBag($name);
175   
176      /**
177       * Gets session meta.
178       *
179       * @return MetadataBag
180       */
181      public function getMetadataBag();
182  }
183