b2pweb / bdf-dsn
A dsn (data source name) parser
Installs: 14 496
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ~7.1 | ~8.0.0 | ~8.1.0 | ~8.2.0 | ~8.3.0 | ~8.4.0
Requires (Dev)
- phpunit/phpunit: ~7.0 | ~8.0 | ~9.0
README
A simple DSN parser
Install via composer
$ composer require b2pweb/bdf-dsn
Usage Instructions
A basic use of DSN.
<?php $request = \Bdf\Dsn\Dsn::parse('mysql://john:doe@localhost/testdb?timeout=3'); var_dump($request->toArray());
Supports pdo dsn
<?php $request = \Bdf\Dsn\Dsn::parse('mysql:host=localhost;dbname=testdb;timeout=3'); var_dump($request->toArray());
License
Distributed under the terms of the MIT license.