function Connection::getKey

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::getKey()
  2. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::getKey()
  3. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::getKey()

Returns the key this connection is associated with.

Return value

string|null The key of this connection, or NULL if no key is set.

File

core/lib/Drupal/Core/Database/Connection.php, line 764

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function getKey() {
    return $this->key;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.