Database
in package
Table of Contents
Methods
- load() : DatabaseEngine
- Gets the database instance, initializing it if needed
Methods
load()
Gets the database instance, initializing it if needed
public
static load(array<string|int, mixed> &$config) : DatabaseEngine
The correct database instance to initialize will be determined from the $Config['database']['engine'] preference. Expected value is an instance of DatabaseEngine.
Example:
$Config['database']['engine'] = 'Foo\Quux';
$db = Database::load(); // Database::load() will call Foo\Quux::load();
Parameters
- $config : array<string|int, mixed>