public function register()
{
$this->config = $this->app->getConfig();
$this->dic = $this->app->getContainer();
$this->dic->define('Autarky\\Http\\SessionHandlerFactory', function () {
return new SessionHandlerFactory($this->dic, $this->config);
});
$this->dic->share('Autarky\\Http\\SessionHandlerFactory');
$this->dic->define('SessionHandlerInterface', [$this, 'makeSessionHandler']);
$this->dic->share('SessionHandlerInterface');
$this->dic->define('Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface', [$this, 'makeSessionStorage']);
$this->dic->share('Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface');
$this->dic->define('Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag', function () {
return new AttributeBag('_autarky_attributes');
});
$this->dic->alias('Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag', 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface');
$this->dic->define('Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag', function () {
return new AutoExpireFlashBag('_autarky_flashes');
});
$this->dic->alias('Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag', 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface');
$this->dic->define('Symfony\\Component\\HttpFoundation\\Session\\Session', [$this, 'makeSession']);
$this->dic->share('Symfony\\Component\\HttpFoundation\\Session\\Session');
$this->dic->alias('Symfony\\Component\\HttpFoundation\\Session\\Session', 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');
$this->app->addMiddleware(['Autarky\\Http\\SessionMiddleware', $this->app]);
}