Connection::__construct

public Connection::__construct(\PDO $connection, array $connection_options = array())

Constructs a Connection object.

Overrides Connection::__construct

File

core/lib/Drupal/Core/Database/Driver/mysql/Connection.php, line 64

Class

Connection
MySQL implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\Core\Database\Driver\mysql

Code

public function __construct(\PDO $connection, array $connection_options = array()) {
  parent::__construct($connection, $connection_options);

  // This driver defaults to transaction support, except if explicitly passed FALSE.
  $this->transactionSupport = !isset($connection_options['transactions']) || ($connection_options['transactions'] !== FALSE);

  // MySQL never supports transactional DDL.
  $this->transactionalDDLSupport = FALSE;

  $this->connectionOptions = $connection_options;
}
doc_Drupal
2016-10-29 08:56:05
Comments
Leave a Comment

Please login to continue.