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

Breadcrumb

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

function PdoStore::getConnection

1 call to PdoStore::getConnection()
PdoStore::save in vendor/symfony/lock/Store/PdoStore.php
Stores the resource if it's not locked by someone else.

File

vendor/symfony/lock/Store/PdoStore.php, line 172

Class

PdoStore
PdoStore is a PersistingStoreInterface implementation using a PDO connection.

Namespace

Symfony\Component\Lock\Store

Code

private function getConnection() : \PDO {
    if (!isset($this->conn)) {
        $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions);
        $this->conn
            ->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
    }
    return $this->conn;
}

API Navigation

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