exileed / pdoparsedsn
A class for parsing PHP's PDO strings.
Installs: 2 634
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ~5.6|~7.0
Requires (Dev)
- phpunit/phpunit: >=5.5
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-10-29 05:43:57 UTC
README
Library to parse a PDO DSN string.
Install
Via Composer
$ composer require exileed/pdoparsedsn
Usage
$dsn = new \ExileeD\PDOParseDSN\DSN('mysql:host=127.0.0.1;port=3306;dbname=test_db'); $dsn->getProtocol(); // mysql $dsn->getHost(); // 127.0.0.1 $dsn->getPort(); // 3306 $dsn->getDatabase(); // test_db
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ 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.