public function setSessionCookieLifetime($ttl) { // Set new cookie TTL session_set_cookie_params($ttl); if ($this->sessionExists()) { // There is a running session so we'll regenerate id to send a new cookie $this->regenerateId(); } }