DatabaseConnectionService
class DatabaseConnectionService (View source)
Properties
protected array<string,string> | $supportedDatabaseDrivers |
Methods
Return an array with the available database drivers
Verify the database connection settings
Create a database with the connection settings and verify the connection
Tries to connect to the database using the specified $connectionSettings
Connects to the database using the specified $connectionSettings and tries to create a database named $databaseName.
Details
array
getAvailableDrivers()
Return an array with the available database drivers
verifyDatabaseConnectionWorks(array $connectionSettings)
Verify the database connection settings
createDatabaseAndVerifyDatabaseConnectionWorks(array $connectionSettings)
Create a database with the connection settings and verify the connection
protected void
connectToDatabase(array $connectionSettings)
Tries to connect to the database using the specified $connectionSettings
protected void
createDatabase(array $connectionSettings, string $databaseName)
Connects to the database using the specified $connectionSettings and tries to create a database named $databaseName.