/**
* Constructor
*
* @param Input $input Input object
* @param \SessionHandlerInterface $handler Session save handler
* @param array $options Session options
*
* @since 4.0.0
*/
public function __construct(Input $input, \SessionHandlerInterface $handler = null, array $options = [])
{
// Disable transparent sid support and default use cookies
$options += ['use_cookies' => 1, 'use_trans_sid' => 0];
if (!headers_sent() && !$this->isActive()) {
session_cache_limiter('none');
}
$this->setOptions($options);
$this->setHandler($handler);
$this->setCookieParams();
$this->data = new Registry();
$this->input = $input;
// Register our function as shutdown method, so we can manipulate it
register_shutdown_function([$this, 'close']);
}