Constructor.
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):
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);
}