/** * Creates a new session instance from the store. * * @param \Elegant\Session\SessionStoreInterface $store * * @return \Elegant\Session\Session */ protected final function createSession(SessionStoreInterface $store) { $container = $this->getContainer(); $session = new Session($container->get('request'), $container->get('cookies'), $store); $session->setDataTtl($this->getConfigParam('data.ttl', 1800)); $session->setCookieName($this->getConfigParam('cookie.name', 's')); $session->setCookieTtl($this->getConfigParam('cookie.ttl', 0)); $session->setCookiePath($this->getConfigParam('cookie.path')); $session->setCookieDomain($this->getConfigParam('cookie.domain', '')); $session->isCookieSecure($this->getConfigParam('cookie.secure', false)); $session->isCookieHttpOnly($this->getConfigParam('cookie.http_only', true)); $session->start(); return $session; }