function Connection::version

Same name in this branch
  1. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()
  2. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()
Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()
  2. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()
  3. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::version()
  4. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()
  5. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()
  6. 11.x core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection::version()
  7. 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection::version()
  8. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::version()

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/modules/mysql/src/Driver/Database/mysql/Connection.php, line 266

Class

Connection
MySQL implementation of <a href="/api/drupal/core%21lib%21Drupal%21Core%21Database%21Connection.php/class/Connection/9" title="Base Database API class." class="local">\Drupal\Core\Database\Connection</a>.

Namespace

Drupal\mysql\Driver\Database\mysql

Code

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

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