class MySQLDatabaseManager extends TenantDatabaseManager (View source)

Properties

protected string $connection

The database connection to the server.

from  TenantDatabaseManager

Methods

Connection
database()

Get the DB connection used by the tenant database manager.

void
setConnection(string $connection)

Set the DB connection that should be used by the tenant database manager.

array
makeConnectionConfig(array $baseConfig, string $databaseName)

Construct a DB connection config array.

bool
createDatabase(TenantWithDatabase $tenant)

Create a database.

bool
deleteDatabase(TenantWithDatabase $tenant)

Delete a database.

bool
databaseExists(string $name)

Does a database exist?

Details

Connection database()

Get the DB connection used by the tenant database manager.

Return Value

Connection

void setConnection(string $connection)

Set the DB connection that should be used by the tenant database manager.

Parameters

string $connection

Return Value

void

Exceptions

NoConnectionSetException

array makeConnectionConfig(array $baseConfig, string $databaseName)

Construct a DB connection config array.

Parameters

array $baseConfig
string $databaseName

Return Value

array

bool createDatabase(TenantWithDatabase $tenant)

Create a database.

Parameters

TenantWithDatabase $tenant

Return Value

bool

bool deleteDatabase(TenantWithDatabase $tenant)

Delete a database.

Parameters

TenantWithDatabase $tenant

Return Value

bool

bool databaseExists(string $name)

Does a database exist?

Parameters

string $name

Return Value

bool