$this->password =
$options['db_password'
] ??
$this->password;
$this->connectionOptions =
$options['db_connection_options'
] ??
$this->connectionOptions;
} /**
* @return void
*/
public function save(Key
$key) { $key->
reduceLifetime($this->initialTtl
);
$sql = "INSERT INTO
$this->table (
$this->idCol,
$this->tokenCol,
$this->expirationCol) VALUES (:id, :token, {
$this->
getCurrentTimestampStatement()} +
$this->initialTtl)";
$conn =
$this->
getConnection();
try { $stmt =
$conn->
prepare($sql);
} catch (\PDOException
) { if (!
$conn->
inTransaction() || \
in_array($this->driver,
['pgsql', 'sqlite', 'sqlsrv'
], true
)) { $this->
createTable();
} $stmt =
$conn->
prepare($sql);
} $stmt->
bindValue(':id',
$this->
getHashedKey($key));