function Session::__construct
Same name in this branch
- 11.1.x vendor/lullabot/php-webdriver/lib/WebDriver/Session.php \WebDriver\Session::__construct()
- 11.1.x vendor/behat/mink/src/Session.php \Behat\Mink\Session::__construct()
- 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\SessionCode
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);
}