Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Session.php

function Session::__construct

Same name in this branch
  1. 11.1.x vendor/lullabot/php-webdriver/lib/WebDriver/Session.php \WebDriver\Session::__construct()
  2. 11.1.x vendor/behat/mink/src/Session.php \Behat\Mink\Session::__construct()
  3. 11.1.x core/lib/Drupal/Core/StackMiddleware/Session.php \Drupal\Core\StackMiddleware\Session::__construct()

File

vendor/symfony/http-foundation/Session/Session.php, line 43

Class

Session
@author Fabien Potencier <fabien@symfony.com> @author Drak <drak@zikula.org>

Namespace

Symfony\Component\HttpFoundation\Session

Code

public function __construct(?SessionStorageInterface $storage = null, ?AttributeBagInterface $attributes = null, ?FlashBagInterface $flashes = null, ?callable $usageReporter = null) {
    $this->storage = $storage ?? new NativeSessionStorage();
    $this->usageReporter = null === $usageReporter ? null : $usageReporter(...);
    $attributes ??= new AttributeBag();
    $this->attributeName = $attributes->getName();
    $this->registerBag($attributes);
    $flashes ??= new FlashBag();
    $this->flashName = $flashes->getName();
    $this->registerBag($flashes);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal