$this->
startSession();
// Is session ID auto-regeneration configured? (ignoring ajax requests)
if ((empty($_SERVER['HTTP_X_REQUESTED_WITH'
]) ||
strtolower($_SERVER['HTTP_X_REQUESTED_WITH'
]) !== 'xmlhttprequest'
) && ($regenerateTime =
$this->config->timeToUpdate
) > 0
) { if (!
isset($_SESSION['__ci_last_regenerate'
])) { $_SESSION['__ci_last_regenerate'
] = Time::
now()->
getTimestamp();
} elseif ($_SESSION['__ci_last_regenerate'
] <
(Time::
now()->
getTimestamp() -
$regenerateTime)) { $this->
regenerate((bool) $this->config->regenerateDestroy
);
} } // Another work-around ... PHP doesn't seem to send the session cookie
// unless it is being currently created or regenerated
elseif (isset($_COOKIE[$this->config->cookieName
]) &&
$_COOKIE[$this->config->cookieName
] ===
session_id()) { $this->
setCookie();
} $this->
initVars();
$this->logger->
info("Session: Class initialized using '" .
$this->config->driver . "' driver."
);