function Connection::setKey

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

Tells this connection object what its key is.

Parameters

string $key: The key this connection is for.

File

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

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function setKey($key) {
    if (!isset($this->key)) {
        $this->key = $key;
    }
}

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