Connection.php in Drupal 8
Same filename in this branch
- 8 core/lib/Drupal/Core/Database/Connection.php
- 8 core/tests/fixtures/database_drivers/custom/corefake/Connection.php
- 8 core/tests/fixtures/database_drivers/custom/fake/Connection.php
- 8 core/tests/fixtures/database_drivers/core/corefake/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
- 8 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
Same filename and directory in other branches
File
core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.phpView 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
Name | Description |
---|---|
Connection | MySQL test implementation of \Drupal\Core\Database\Connection. |