PHPackages                             imateapot/xpdo - 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. imateapot/xpdo

ActiveLibrary

imateapot/xpdo
==============

PDO extension

0.1.3(3y ago)0214↑2150%MITPHP

Since Feb 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/imateapot92/xPDO)[ Packagist](https://packagist.org/packages/imateapot/xpdo)[ RSS](/packages/imateapot-xpdo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

xPDO
====

[](#xpdo)

xPDO is a PHP extension that currently only includes a system to simplify the management of table name prefixes ad supports nested transactions ( only with mysql/pgsql drivers ).

Installation
------------

[](#installation)

You can install xPDO via Composer:

`composer require imateapot/xpdo`

Usage
-----

[](#usage)

To use xPDO, you first need to include the class. Then, you can create a new xPDO instance like this:

```
use imateapot\xPDO;
...
$db = new xPDO($dsn, $user, $password, $options, $xOptions);

```

where `$dsn`, `$user`, `$password` and `$options` are the standard parameters for creating a PDO instance, and the optional parameter `$xOptions` contains additional options for xPDO.

You can use xPDO exactly as you would use PDO, but with the ability to specify the use of table name prefixes using the syntax ``.

For example:

```
...
$xOptions = [
	'table_prefix' => 'prefix_'
];
$db = new xPDO($dsn, $user, $password, $options, $xOptions);
$stmt = $db->prepare('SELECT * FROM  WHERE id = :id');
$stmt->execute(['id' => $id]);

```

the table prefix specified in `$xOptions['table_prefix']` will be automatically added to the table name "my\_table".

Contributions
-------------

[](#contributions)

Contributions to this package are welcome. If you would like to contribute, you can open a Pull Request on GitHub.

License
-------

[](#license)

This package is distributed under the MIT license. For more information, please see the LICENSE file included in this package.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~3 days

Total

4

Last Release

1164d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fd12eb727437ee028be286e221ea3653c445079828b98b0c4da3823ddfdcca1?d=identicon)[federicofz](/maintainers/federicofz)

---

Top Contributors

[![imateapot92](https://avatars.githubusercontent.com/u/94406462?v=4)](https://github.com/imateapot92 "imateapot92 (12 commits)")

### Embed Badge

![Health badge](/badges/imateapot-xpdo/health.svg)

```
[![Health](https://phpackages.com/badges/imateapot-xpdo/health.svg)](https://phpackages.com/packages/imateapot-xpdo)
```

PHPackages © 2026

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