public function Session::__construct in Zircon Profile 8
Same name in this branch
- 8 vendor/behat/mink/src/Session.php \Behat\Mink\Session::__construct()
- 8 vendor/symfony/http-foundation/Session/Session.php \Symfony\Component\HttpFoundation\Session\Session::__construct()
- 8 core/lib/Drupal/Core/StackMiddleware/Session.php \Drupal\Core\StackMiddleware\Session::__construct()
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Session/Session.php \Symfony\Component\HttpFoundation\Session\Session::__construct()
Constructor.
Parameters
SessionStorageInterface $storage A SessionStorageInterface instance.:
AttributeBagInterface $attributes An AttributeBagInterface instance, (defaults null for default AttributeBag):
FlashBagInterface $flashes A FlashBagInterface instance (defaults null for default FlashBag):
File
- vendor/
symfony/ http-foundation/ Session/ Session.php, line 53
Class
- Session
- Session.
Namespace
Symfony\Component\HttpFoundation\SessionCode
public function __construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null) {
$this->storage = $storage ?: new NativeSessionStorage();
$attributes = $attributes ?: new AttributeBag();
$this->attributeName = $attributes
->getName();
$this
->registerBag($attributes);
$flashes = $flashes ?: new FlashBag();
$this->flashName = $flashes
->getName();
$this
->registerBag($flashes);
}