1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00
tenancy/src/Database/Contracts/StatefulTenantDatabaseManager.php
2024-05-17 14:23:54 +02:00

24 lines
682 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Database\Contracts;
use Illuminate\Database\Connection;
use Stancl\Tenancy\Database\Exceptions\NoConnectionSetException;
/**
* Tenant database manager with a persistent connection.
*/
interface StatefulTenantDatabaseManager extends TenantDatabaseManager
{
/** Get the DB connection used by the tenant database manager. */
public function database(): Connection; // todo@dbRefactor rename to connection()
/**
* Set the DB connection that should be used by the tenant database manager.
*
* @throws NoConnectionSetException
*/
public function setConnection(string $connection): void;
}