exileed/pdoparsedsn

A class for parsing PHP's PDO strings.

1.0.0 2020-03-03 10:18 UTC

This package is auto-updated.

Last update: 2024-11-29 05:57:27 UTC


README

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

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.