You are here

Connection.php in Drupal 10

Same filename in this branch
  1. 10 core/lib/Drupal/Core/Database/Connection.php
  2. 10 core/tests/fixtures/database_drivers/custom/corefake/Connection.php
  3. 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php
  4. 10 core/tests/fixtures/database_drivers/core/corefake/Connection.php
  5. 10 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
  6. 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
  7. 10 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
  8. 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php
  9. 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php
  10. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php
  11. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
  12. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
  13. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
  14. 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php
  15. 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php
  16. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
  17. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
  18. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
Same filename and directory in other branches
  1. 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
  2. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php

File

core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
View source
<?php

namespace Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion;

include_once dirname(__DIR__, 8) . '/mysql/src/Driver/Database/mysql/Connection.php';
use Drupal\mysql\Driver\Database\mysql\Connection as CoreConnection;

/**
 * MySQL test implementation of \Drupal\Core\Database\Connection.
 */
class Connection extends CoreConnection {

  /**
   * Hardcoded database server version.
   *
   * Faking that we are on a deprecated database.
   *
   * @var string
   */
  protected $databaseVersion = '10.2.31-MariaDB-1:10.2.31+maria~bionic-log';

  /**
   * {@inheritdoc}
   */
  public function driver() {
    return 'DrivertestMysqlDeprecatedVersion';
  }

  /**
   * {@inheritdoc}
   */
  public function isMariaDb() : bool {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function version() {
    return $this->databaseVersion;
  }

  /**
   * {@inheritdoc}
   */
  protected function getServerVersion() : string {
    return $this->databaseVersion;
  }

}

Classes

Namesort descending Description
Connection MySQL test implementation of \Drupal\Core\Database\Connection.