function StubConnection::driverTransactionManager

Returns a new instance of the driver's transaction manager.

Database drivers must implement their own class extending from \Drupal\Core\Database\Transaction\TransactionManagerBase, and instantiate it here.

phpcs:ignore Drupal.Commenting.FunctionComment.InvalidNoReturn

Return value

\Drupal\Core\Database\Transaction\TransactionManagerInterface The transaction manager.

Overrides Connection::driverTransactionManager

File

core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php, line 155

Class

StubConnection
A stub of the abstract Connection class for testing purposes.

Namespace

Drupal\Tests\Core\Database\Stub

Code

protected function driverTransactionManager() : TransactionManagerInterface {
  return new StubTransactionManager($this);
}

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