function Tasks::name
Returns the human-readable name of the driver.
Return value
string The human-readable name of the driver.
Overrides Tasks::name
2 methods override Tasks::name()
- Tasks::name in core/
modules/ system/ tests/ modules/ driver_test/ src/ Driver/ Database/ DrivertestMysql/ Install/ Tasks.php - Returns the human-readable name of the driver.
- Tasks::name in core/
modules/ system/ tests/ modules/ driver_test/ src/ Driver/ Database/ DrivertestMysqlDeprecatedVersion/ Install/ Tasks.php - Returns the human-readable name of the driver.
File
-
core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Install/ Tasks.php, line 62
Class
- Tasks
- Specifies installation tasks for MySQL and equivalent databases.
Namespace
Drupal\mysql\Driver\Database\mysql\InstallCode
public function name() {
try {
if (!$this->isConnectionActive() || !$this->getConnection() instanceof Connection) {
throw new ConnectionNotDefinedException('The database connection is not active or not a MySql connection');
}
if ($this->getConnection()
->isMariaDb()) {
return $this->t('MariaDB');
}
return $this->t('MySQL, Percona Server, or equivalent');
} catch (ConnectionNotDefinedException $e) {
return $this->t('MySQL, MariaDB, Percona Server, or equivalent');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.