PHPackages                             r-tk/rtk-db - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. r-tk/rtk-db

ActiveLibrary

r-tk/rtk-db
===========

RTK DB

022PHP

Since Mar 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/r-tk/rtk-db)[ Packagist](https://packagist.org/packages/r-tk/rtk-db)[ RSS](/packages/r-tk-rtk-db/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

RTK DB
======

[](#rtk-db)

DB connections manager with some unifying between adapters

[![Latest version](https://camo.githubusercontent.com/e7bcf31dc9a41775e95e32d294a388b868e3af90e188b89f82eb1caf877fa544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f722d746b2f72746b2d64622e737667)](https://packagist.org/packages/r-tk/rtk-db)[![travis-ci](https://camo.githubusercontent.com/fd1aff8e846b9ef983df14841e1033328f9e5295d82848bd4d174c547f61b734/68747470733a2f2f7472617669732d63692e6f72672f722d746b2f72746b2d64622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/r-tk/rtk-db)[![Coverage Status](https://camo.githubusercontent.com/854306e20558ad5767172639ebf0c9b89e74dcd682426802963652e90b653842/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f722d746b2f72746b2d64622f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/r-tk/rtk-db?branch=master)[![License](https://camo.githubusercontent.com/334cd591af34ea36bb6d41f47ac78a72d52e5b8568483432ac63bf34b1e0df3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f722d746b2f72746b2d64622e737667)](https://packagist.org/packages/r-tk/rtk-db)[![Total Downloads](https://camo.githubusercontent.com/057ed3aed12aaf9c9b76e19e1612e7dde42f6e913f3ae6865861444768350652/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f722d746b2f72746b2d64622e737667)](https://packagist.org/packages/r-tk/rtk-db)

Define connection
-----------------

[](#define-connection)

```
use RTK\DB\DB;

DB::addInstance('default', array(
	'type'      => 'mysqli',
	'host'      => 'localhost',
	'user'      => 'root',
	'password'  => '',
	'database'  => 'test',
));
// or
DB::addInstance('default', array(
	'type'      => 'PDOMysql',
	'host'      => 'localhost',
	'user'      => 'root',
	'password'  => '',
	'database'  => 'test',
));
// or
DB::addInstance('default', array(
	'type'      => 'PDOMysql',
	'dsn'      => 'mysql:dbname=test;host=localhost',
	'user'      => 'root',
	'password'  => '',
));
```

Get connection instance
-----------------------

[](#get-connection-instance)

```
use RTK\DB\DB;

$db = DB::get('default');

// omitting instance name will return instance 'default'
$db = DB::get();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/858fe0b930f74aa16e031b749851ea972fd23fbf957b175adb7678f78383b215?d=identicon)[raul72](/maintainers/raul72)

### Embed Badge

![Health badge](/badges/r-tk-rtk-db/health.svg)

```
[![Health](https://phpackages.com/badges/r-tk-rtk-db/health.svg)](https://phpackages.com/packages/r-tk-rtk-db)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
