PHPackages                             packaged/dal - 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. packaged/dal

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

packaged/dal
============

Data Access Layer

1.18.5(2mo ago)477.5k↓41.3%2[2 PRs](https://github.com/packaged/dal/pulls)MITPHPPHP ^7.2||^8.0CI passing

Since Jan 23Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/packaged/dal)[ Packagist](https://packagist.org/packages/packaged/dal)[ RSS](/packages/packaged-dal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (146)Used By (0)

Data Access Layer
=================

[](#data-access-layer)

[![Latest Stable Version](https://camo.githubusercontent.com/b78b3e1139b8d514b1662e4d56338997e560c412381b9ad7b158c7b9d0d45868/68747470733a2f2f706f7365722e707567782e6f72672f7061636b616765642f64616c2f76657273696f6e2e706e67)](https://packagist.org/packages/packaged/dal)[![Total Downloads](https://camo.githubusercontent.com/748f3a61cf8539f2cc89e4d242aeccac7ddb9c99b635c24813951b2a57a33de6/68747470733a2f2f706f7365722e707567782e6f72672f7061636b616765642f64616c2f642f746f74616c2e706e67)](https://packagist.org/packages/packaged/dal)[![CircleCI](https://camo.githubusercontent.com/352abc2f1abddfeb6e5e0904e38408ebf09c37beb9d143adec8eea4a1ee103a0/68747470733a2f2f636972636c6563692e636f6d2f67682f7061636b616765642f64616c2e7376673f7374796c653d736869656c64)](https://circleci.com/gh/packaged/dal)[![Dependency Status](https://camo.githubusercontent.com/a9c9fd25d299c729c8f34bf9d4a4c06d203cdb1100277fd3c6f0fa98751d3280/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f7061636b616765643a64616c2f62616467652e706e67)](https://www.versioneye.com/php/packaged:dal)[![Coverage Status](https://camo.githubusercontent.com/ae065ff8962ca7657221fcd9246db401e5a72279f6b5ed32734a139779d3f0cc/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7061636b616765642f64616c2f62616467652e706e67)](https://coveralls.io/r/packaged/dal)

Getting Started
===============

[](#getting-started)

```
$connectionConfig = new \Packaged\Config\Provider\Ini\IniConfigProvider(
  build_path('config', 'connections.ini')
);
$datastoreConfig  = new \Packaged\Config\Provider\Ini\IniConfigProvider(
  build_path('config', 'datastores.ini')
);

$resolver = new \Packaged\Dal\DalResolver($connectionConfig,$datastoreConfig);
$resolver->boot();

```

connections.ini

```
[users]
construct_class = \Packaged\Dal\Ql\PdoConnection

```

datastores.ini

```
[users]
construct_class = \Packaged\Dal\Ql\QlDataStore
connection = users

```

users.php

```
class User extends QlDao
{
  protected $_dataStoreName = 'users';
  public $id;
  public $name;
}

```

Basic Usage

```
$user       = new User();
$user->name = 'Test';
$user->save();

$user->name = 'Testing';
$user->save();

$user->delete();

$user     = new User();
$user->id = 4;
$user->load();

$tbUsers = User::collection(['name' => ['Test','Testing']]);
foreach($tbUsers as $user)
{
echo "Located $user->name\n";
}

$users = User::collection();
var_dump($users->min('id'));
var_dump($users->max('id'));
var_dump($users->sum('id'));
var_dump($users->avg('id'));

var_dump_json($users->distinct('name'));

```

FYI
===

[](#fyi)

DAO = Data Access Object

SQL Translation
===============

[](#sql-translation)

**IDao** A Single Row within the database

**IDataStore** The Table within the database

**IDataConection** The connection to the database server e.g. PDO

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50.8% 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 ~30 days

Recently: every ~243 days

Total

136

Last Release

68d ago

Major Versions

0.23.5 → 1.0.02017-07-18

PHP version history (4 changes)0.1.0PHP &gt;=5.6.0

1.9.6PHP &gt;=7.1

1.16.0PHP &gt;=7.2

1.18.0PHP ^7.2||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2dc779402c4fa879b9f63159900da2a4c766661286182c4cecd66a7d4fc71ed?d=identicon)[bajbnet](/maintainers/bajbnet)

![](https://avatars.githubusercontent.com/u/299656?v=4)[Tom Kay](/maintainers/tomk)[@TomK](https://github.com/TomK)

---

Top Contributors

[![bajb](https://avatars.githubusercontent.com/u/2241334?v=4)](https://github.com/bajb "bajb (152 commits)")[![TomK](https://avatars.githubusercontent.com/u/299656?v=4)](https://github.com/TomK "TomK (126 commits)")[![rgooding](https://avatars.githubusercontent.com/u/3207236?v=4)](https://github.com/rgooding "rgooding (7 commits)")[![cleeve](https://avatars.githubusercontent.com/u/11215529?v=4)](https://github.com/cleeve "cleeve (6 commits)")[![MrEssex](https://avatars.githubusercontent.com/u/5024348?v=4)](https://github.com/MrEssex "MrEssex (4 commits)")[![infurio](https://avatars.githubusercontent.com/u/6320267?v=4)](https://github.com/infurio "infurio (2 commits)")[![Jleagle](https://avatars.githubusercontent.com/u/381099?v=4)](https://github.com/Jleagle "Jleagle (1 commits)")[![callyall](https://avatars.githubusercontent.com/u/22823321?v=4)](https://github.com/callyall "callyall (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/packaged-dal/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[doctrine/doctrine-module

Laminas Module that provides Doctrine basic functionality required for ORM and ODM modules

3957.9M116](/packages/doctrine-doctrine-module)[api-platform/schema-generator

Various tools to generate a data model based on Schema.org vocables

4714.2M7](/packages/api-platform-schema-generator)[codesleeve/stapler

Elegant and simple ORM-based file upload package for php.

538366.4k5](/packages/codesleeve-stapler)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[mysql-workbench-schema-exporter/mysql-workbench-schema-exporter

MySQL Workbench Schema Exporter

488188.5k10](/packages/mysql-workbench-schema-exporter-mysql-workbench-schema-exporter)

PHPackages © 2026

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