-
Notifications
You must be signed in to change notification settings - Fork 0
API DatabaseManager
Christophe SAUVEUR edited this page Sep 29, 2024
·
2 revisions
final class DatabaseManager implements Services\IDatabaseService
Database manager class, acting as the default database service implementation
Since 1.0
public function __construct(Services\IConfigService $configService)
Constructor
Since 2.0
Name | Type | Description |
---|---|---|
$configService |
IConfigService |
public function close(DatabaseConnectionInstance &$connectionInstance)
Closes a database server connection
Since 2.0
Name | Type | Description |
---|---|---|
$connectionInstance |
DatabaseConnectionInstance |
Reference to a database connection instance |
public function open(string $server = 'self::DEFAULT_CONNECTION', bool $forceNew = false): DatabaseConnectionInstance
Opens a connection to a database server, or returns the currently active instance to this server
Since 2.0
Name | Type | Description |
---|---|---|
$server |
string |
Server configuration key (Defaults to __default). |
$forceNew |
bool |
If set, a new connection is open even if a previous similar one exists in the cache (Defaults to false) |
DatabaseConnectionInstance
Exception | Reason |
---|---|
DatabaseManagerException |
If no configuration is available nor valid for this server key |
Getting Started | Framework Reference | API Reference | MFX is released under the MIT license