PHPackages                             adirona/pdo-connection - 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. [Database &amp; ORM](/categories/database)
4. /
5. adirona/pdo-connection

ActiveLibrary[Database &amp; ORM](/categories/database)

adirona/pdo-connection
======================

Simple PHP library to make PDO connection

02PHP

Since Oct 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cryptoks/pdo-connection-wrapper)[ Packagist](https://packagist.org/packages/adirona/pdo-connection)[ RSS](/packages/adirona-pdo-connection/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

PDO Connection Wrapper With PHP
===============================

[](#pdo-connection-wrapper-with-php)

This is a simple PHP library for PDO connection

### Installation

[](#installation)

Install library via composer :

```
composer require adirona/pdo-connection
```

How to use this library
-----------------------

[](#how-to-use-this-library)

##### Initialize Connection Class

[](#initialize-connection-class)

Connection class accepts 2 arrays in it's constructor first one is DSN settings and the second one is for connection options and third attribute is which PDO driver do you want to use for connection default is MYSQL. You can check PDO Drivers  or using SupportedPDODatabaseDrivers() method

```
$DatabaseInstance = new Connection([
    'host' => 'localhost',
    'database_name' => 'db_name',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8'
],[
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
    PDO::ATTR_EMULATE_PREPARES   => false,
], 'mysql');
```

##### Connect Now

[](#connect-now)

```
$ConnectDatabase = $DatabaseInstance->connect();
```

To get most of this PDO wrapper and PDO in general use also this repository ().

You can find same example at examples folder of this repository.
================================================================

[](#you-can-find-same-example-at-examples-folder-of-this-repository)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/9b1e9c09bd6332624ae7f6cb0db8b32c3a8f585312820fd81b35a306622b3694?d=identicon)[albiansadiku](/maintainers/albiansadiku)

---

Top Contributors

[![cryptoks](https://avatars.githubusercontent.com/u/36383273?v=4)](https://github.com/cryptoks "cryptoks (3 commits)")

### Embed Badge

![Health badge](/badges/adirona-pdo-connection/health.svg)

```
[![Health](https://phpackages.com/badges/adirona-pdo-connection/health.svg)](https://phpackages.com/packages/adirona-pdo-connection)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.8k117.8M121](/packages/jdorn-sql-formatter)[backup-manager/backup-manager

A framework agnostic database backup manager with user-definable procedures and support for S3, Dropbox, FTP, SFTP, and more with drivers for popular frameworks.

1.7k1.6M11](/packages/backup-manager-backup-manager)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M88](/packages/propel-propel1)[insolita/yii2-migration-generator

Set of gii tools for generating files for migration by schema of table , phpdoc or table data

108508.0k5](/packages/insolita-yii2-migration-generator)[xpdo/xpdo

A PDO-based Object/Relational Bridge Library

7088.4k4](/packages/xpdo-xpdo)[voku/session2db

A PHP library acting as a wrapper for PHP's default session handling functions which stores data in a MySQL database, providing both better performance and better security and protection against session fixation and session hijacking.

2920.0k](/packages/voku-session2db)

PHPackages © 2026

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