Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DoctrineDbalStore.php

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\Store

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal