项目作者: exileed

项目描述 :
Library to parse a PDO DSN string
高级语言: PHP
项目地址: git://github.com/exileed/PDOParseDSN.git
创建时间: 2020-03-03T10:19:06Z
项目社区:https://github.com/exileed/PDOParseDSN

开源协议:MIT License

下载


PDOParseDSN

Latest Version on Packagist
Software License
Build Status
Coverage Status
Quality Score
Total Downloads

Library to parse a PDO DSN string.

Install

Via Composer

  1. $ composer require exileed/pdoparsedsn

Usage

  1. $dsn = new \ExileeD\PDOParseDSN\DSN('mysql:host=127.0.0.1;port=3306;dbname=test_db');
  2. $dsn->getProtocol(); // mysql
  3. $dsn->getHost(); // 127.0.0.1
  4. $dsn->getPort(); // 3306
  5. $dsn->getDatabase(); // test_db

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

  1. $ composer test

Security

If you discover any security related issues, please email me@exileed.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.