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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

AbstractProxy.php

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 2.29 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\Storage\Proxy;
013   
014  /**
015   * @author Drak <drak@zikula.org>
016   */
017  abstract class AbstractProxy
018  {
019      /**
020       * Flag if handler wraps an internal PHP session handler (using \SessionHandler).
021       *
022       * @var bool
023       */
024      protected $wrapper = false;
025   
026      /**
027       * @var string
028       */
029      protected $saveHandlerName;
030   
031      /**
032       * Gets the session.save_handler name.
033       *
034       * @return string|null
035       */
036      public function getSaveHandlerName()
037      {
038          return $this->saveHandlerName;
039      }
040   
041      /**
042       * Is this proxy handler and instance of \SessionHandlerInterface.
043       *
044       * @return bool
045       */
046      public function isSessionHandlerInterface()
047      {
048          return $this instanceof \SessionHandlerInterface;
049      }
050   
051      /**
052       * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler.
053       *
054       * @return bool
055       */
056      public function isWrapper()
057      {
058          return $this->wrapper;
059      }
060   
061      /**
062       * Has a session started?
063       *
064       * @return bool
065       */
066      public function isActive()
067      {
068          return \PHP_SESSION_ACTIVE === session_status();
069      }
070   
071      /**
072       * Gets the session ID.
073       *
074       * @return string
075       */
076      public function getId()
077      {
078          return session_id();
079      }
080   
081      /**
082       * Sets the session ID.
083       *
084       * @param string $id
085       *
086       * @throws \LogicException
087       */
088      public function setId($id)
089      {
090          if ($this->isActive()) {
091              throw new \LogicException('Cannot change the ID of an active session.');
092          }
093   
094          session_id($id);
095      }
096   
097      /**
098       * Gets the session name.
099       *
100       * @return string
101       */
102      public function getName()
103      {
104          return session_name();
105      }
106   
107      /**
108       * Sets the session name.
109       *
110       * @param string $name
111       *
112       * @throws \LogicException
113       */
114      public function setName($name)
115      {
116          if ($this->isActive()) {
117              throw new \LogicException('Cannot change the name of an active session.');
118          }
119   
120          session_name($name);
121      }
122  }
123