'sqlite' => "CREATE TABLE
$this->table (
$this->idCol TEXT NOT NULL PRIMARY KEY,
$this->dataCol BLOB NOT NULL,
$this->lifetimeCol INTEGER NOT NULL,
$this->timeCol INTEGER NOT NULL)",
'pgsql' => "CREATE TABLE
$this->table (
$this->idCol VARCHAR(128) NOT NULL PRIMARY KEY,
$this->dataCol BYTEA NOT NULL,
$this->lifetimeCol INTEGER NOT NULL,
$this->timeCol INTEGER NOT NULL)",
'oci' => "CREATE TABLE
$this->table (
$this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY,
$this->dataCol BLOB NOT NULL,
$this->lifetimeCol INTEGER NOT NULL,
$this->timeCol INTEGER NOT NULL)",
'sqlsrv' => "CREATE TABLE
$this->table (
$this->idCol VARCHAR(128) NOT NULL PRIMARY KEY,
$this->dataCol VARBINARY(MAX) NOT NULL,
$this->lifetimeCol INTEGER NOT NULL,
$this->timeCol INTEGER NOT NULL)",
default =>
throw new \
DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".',
$this->driver
)),
};
try { $this->pdo->
exec($sql);
$this->pdo->
exec("CREATE INDEX {
$this->lifetimeCol
}_idx ON
$this->table (
$this->lifetimeCol)"
);
} catch (\PDOException
$e) { $this->
rollback();
throw $e;
} } /**
* Returns true when the current session exists but expired according to session.gc_maxlifetime.
*
* Can be used to distinguish between a new session and one that expired due to inactivity.
*/
public function isSessionExpired(): bool
{