private string
$flashName;
private string
$attributeName;
private array
$data =
[];
private int
$usageIndex = 0;
private ?\Closure
$usageReporter;
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);
} public function start(): bool
{ return $this->storage->
start();
}