Driver manager is a class responsible to hold information to configure another objects, for example, database connections, logs configurations, etc
build/
src/
examples/
tests/
vendor/
Via Composer
$ composer require gravataLonga/driver-manager
$drivers = [
'memory' => [
'host' => ':memory:',
'driver' => 'sqlite'
],
'master' => [
'host' => 'server.com',
'username' => 'root',
'password' => '1234',
'driver' => 'mysql'
]
];
$required = ['driver', 'host'];
$default = ['timezone' => 'UTC'];
$manager = new Gravatalonga\DriverManager($drivers, $required, $default);
$setting = $manager->driver('memory');
/*
Results:
[
'host' => ':memory:',
'driver' => 'sqlite',
'timezone' => 'UTC'
]
*/
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email jonathan.alexey16@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.