Connection.php

Same filename in this branch
  1. 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
  2. 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
  3. 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
  4. 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
  5. 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
  6. 8.9.x core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php
  7. 8.9.x core/tests/fixtures/database_drivers/core/corefake/Connection.php
  8. 8.9.x core/tests/fixtures/database_drivers/custom/corefake/Connection.php
  9. 8.9.x core/tests/fixtures/database_drivers/custom/fake/Connection.php
  10. 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
  11. 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
  12. 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
  13. 8.9.x core/lib/Drupal/Core/Database/Connection.php
Same filename in other branches
  1. 9 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php
  2. 9 core/modules/mysql/src/Driver/Database/mysql/Connection.php
  3. 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
  4. 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
  5. 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
  6. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
  7. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
  8. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
  9. 9 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php
  10. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php
  11. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php
  12. 9 core/tests/fixtures/database_drivers/core/corefake/Connection.php
  13. 9 core/tests/fixtures/database_drivers/custom/corefake/Connection.php
  14. 9 core/tests/fixtures/database_drivers/custom/fake/Connection.php
  15. 9 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
  16. 9 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
  17. 9 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
  18. 9 core/lib/Drupal/Core/Database/Connection.php
  19. 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php
  20. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php
  21. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
  22. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
  23. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
  24. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
  25. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
  26. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
  27. 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php
  28. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php
  29. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php
  30. 10 core/tests/fixtures/database_drivers/core/CoreFake/Connection.php
  31. 10 core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php
  32. 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php
  33. 10 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
  34. 10 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
  35. 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
  36. 10 core/lib/Drupal/Core/Database/Connection.php
  37. 11.x core/modules/sqlite/src/Driver/Database/sqlite/Connection.php
  38. 11.x core/modules/mysql/src/Driver/Database/mysql/Connection.php
  39. 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Connection.php
  40. 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Connection.php
  41. 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Connection.php
  42. 11.x core/modules/pgsql/src/Driver/Database/pgsql/Connection.php
  43. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php
  44. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php
  45. 11.x core/tests/fixtures/database_drivers/core/CoreFake/Connection.php
  46. 11.x core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php
  47. 11.x core/tests/fixtures/database_drivers/custom/fake/Connection.php
  48. 11.x core/lib/Drupal/Core/Database/Connection.php

Namespace

Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion

File

core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php

View source
<?php

namespace Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion;

use Drupal\Core\Database\Driver\mysql\Connection as CoreConnection;

/**
 * MySQL test implementation of \Drupal\Core\Database\Connection.
 */
class Connection extends CoreConnection {
    
    /**
     * Constructs a Connection object.
     */
    public function __construct(\PDO $connection, array $connection_options = []) {
        // Alias the MySQL classes to avoid having unnecessary copies.
        foreach ([
            'Delete',
            'Insert',
            'Merge',
            'Schema',
            'Upsert',
            'Select',
            'Update',
        ] as $class) {
            class_alias('Drupal\\Core\\Database\\Driver\\mysql\\' . $class, 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysqlDeprecatedVersion\\' . $class);
        }
        parent::__construct($connection, $connection_options);
    }
    
    /**
     * Hardcoded database server version.
     *
     * Faking that we are on a deprecated database.
     *
     * @var string
     */
    protected $databaseVersion = '5.5.2';
    
    /**
     * {@inheritdoc}
     */
    public function driver() {
        return 'DrivertestMysqlDeprecatedVersion';
    }
    
    /**
     * {@inheritdoc}
     */
    public function version() {
        return $this->databaseVersion;
    }

}

Classes

Title Deprecated Summary
Connection MySQL test implementation of \Drupal\Core\Database\Connection.

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