W3cubDocs

/Drupal 8

public function Connection::getConnectionOptions

public Connection::getConnectionOptions()

Returns the connection information for this connection object.

Note that Database::getConnectionInfo() is for requesting information about an arbitrary database connection that is defined. This method is for requesting the connection information of this specific open connection object.

Return value

array An array of the connection information. The exact list of properties is driver-dependent.

File

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

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function getConnectionOptions() {
  return $this->connectionOptions;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Connection.php/function/Connection::getConnectionOptions/8.1.x