class DatabaseManager (View source)

internal  Class is subject to breaking changes in minor and patch versions.
 

Methods

__construct(Application $app, DatabaseManager $database, Repository $config)

No description

void
connectToTenant(TenantWithDatabase $tenant)

Connect to a tenant's database.

void
reconnectToCentral()

Reconnect to the default non-tenant connection.

void
setDefaultConnection(string $connection)

Change the default database connection config.

void
createTenantConnection(TenantWithDatabase $tenant)

Create the tenant database connection.

void
purgeTenantConnection()

Purge the tenant database connection.

void
ensureTenantCanBeCreated(TenantWithDatabase $tenant)

Check if a tenant can be created.

Details

__construct(Application $app, DatabaseManager $database, Repository $config)

No description

Parameters

Application $app
DatabaseManager $database
Repository $config

void connectToTenant(TenantWithDatabase $tenant)

Connect to a tenant's database.

Parameters

TenantWithDatabase $tenant

Return Value

void

void reconnectToCentral()

Reconnect to the default non-tenant connection.

Return Value

void

void setDefaultConnection(string $connection)

Change the default database connection config.

Parameters

string $connection

Return Value

void

void createTenantConnection(TenantWithDatabase $tenant)

Create the tenant database connection.

Parameters

TenantWithDatabase $tenant

Return Value

void

void purgeTenantConnection()

Purge the tenant database connection.

Return Value

void

void ensureTenantCanBeCreated(TenantWithDatabase $tenant)

Check if a tenant can be created.