function DoctrineDbalStore::exists
Overrides PersistingStoreInterface::exists
1 call to DoctrineDbalStore::exists()
- DoctrineDbalStore::putOffExpiration in vendor/
symfony/ lock/ Store/ DoctrineDbalStore.php - Extends the TTL of a resource.
File
-
vendor/
symfony/ lock/ Store/ DoctrineDbalStore.php, line 171
Class
- DoctrineDbalStore
- DbalStore is a PersistingStoreInterface implementation using a Doctrine DBAL connection.
Namespace
Symfony\Component\Lock\StoreCode
public function exists(Key $key) : bool {
$sql = "SELECT 1 FROM {$this->table} WHERE {$this->idCol} = ? AND {$this->tokenCol} = ? AND {$this->expirationCol} > {$this->getCurrentTimestampStatement()}";
$result = $this->conn
->fetchOne($sql, [
$this->getHashedKey($key),
$this->getUniqueToken($key),
], [
ParameterType::STRING,
ParameterType::STRING,
]);
return (bool) $result;
}