e-kevin/yii-dsn-helper

dsn helpers class

Installs: 18

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/e-kevin/yii-dsn-helper

1.1.0 2020-12-16 07:06 UTC

This package is auto-updated.

Last update: 2025-10-04 14:43:16 UTC


README

parsing dsn connection strings for most databases.

Usage

use ekevin\dsn\Dsn;

// parse dsn
$dsn = Dsn::parse("mysql:host='localhost';dbname='testDb';port=3306");

// build dsn
$dsn = Dsn::build([
    'scheme'   => 'mysql',
    'hostname' => 'localhost',
    'port'     => '3306',
    'dbname'   => 'testDb',
])->dsn;