function Connection::open

Same name in this branch
  1. 9 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::open()
  2. 9 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::open()
  3. 9 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::open()
Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection::open()
  2. 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::open()
  3. 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection::open()
  4. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::open()
  5. 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::open()
  6. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::open()
  7. 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::open()
  8. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::open()
  9. 11.x core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection::open()
  10. 11.x core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::open()
  11. 11.x core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection::open()
  12. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::open()

Opens a client connection.

Parameters

array $connection_options: The database connection settings array.

Return value

object A client connection object.

4 methods override Connection::open()
Connection::open in core/modules/sqlite/src/Driver/Database/sqlite/Connection.php
Opens a client connection.
Connection::open in core/modules/mysql/src/Driver/Database/mysql/Connection.php
Opens a client connection.
Connection::open in core/modules/pgsql/src/Driver/Database/pgsql/Connection.php
Opens a client connection.
StubConnection::open in core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
Opens a client connection.

File

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

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public static abstract function open(array &$connection_options = []);

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