gravatalonga/driver-manager
Composer 安装命令:
composer require gravatalonga/driver-manager
包简介
Driver manager is a class responsible to hold information to configure another objects, for example, database connections, logs configurations, etc
README 文档
README
Driver Manager
Driver manager is a class responsible to hold information to configure another objects, for example, database connections, logs configurations, etc
Structure
build/
src/
examples/
tests/
vendor/
Install
Via Composer
$ composer require gravataLonga/driver-manager
Usage
$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' ] */
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email jonathan.alexey16@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 515
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-14
