You are here

public function Connection::version in Drupal 9

Same name in this branch
  1. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()
  2. 9 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection::version()
  3. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()

Returns the version of the database server.

Overrides Connection::version

1 method overrides Connection::version()
Connection::version in core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
Returns the version of the database server.

File

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

Class

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

Namespace

Drupal\Core\Database\Driver\mysql

Code

public function version() {
  if ($this
    ->isMariaDb()) {
    return $this
      ->getMariaDbVersionMatch();
  }
  return $this
    ->getServerVersion();
}