PHPackages                             ksfraser/ksf-modules-dao - 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. ksfraser/ksf-modules-dao

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

ksfraser/ksf-modules-dao
========================

Cross-platform DAO abstraction (DB, WordPress, SuiteCRM, FrontAccounting, CSV, XML)

v0.5.1(1mo ago)0281MITPHPPHP &gt;=7.4

Since Jan 19Pushed 2mo agoCompare

[ Source](https://github.com/ksfraser/ksf_ModulesDAO)[ Packagist](https://packagist.org/packages/ksfraser/ksf-modules-dao)[ RSS](/packages/ksfraser-ksf-modules-dao/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (11)Used By (1)

ksf\_ModulesDAO
===============

[](#ksf_modulesdao)

Cross-platform DAO abstraction for KS Fraser modules.

Related docs (keep in sync)
---------------------------

[](#related-docs-keep-in-sync)

- Overall split plan and repo map: [../../LIBRARY\_SPLIT\_ANALYSIS.md](../../LIBRARY_SPLIT_ANALYSIS.md)
- FA-specific migration notes (schemas + shims): [../fa\_classes/MIGRATION\_NOTES.md](../fa_classes/MIGRATION_NOTES.md)

Goal
----

[](#goal)

Provide small, composable interfaces + adapters so modules can read/write data via:

- Generic DB tables (PDO)
- WordPress (options/settings APIs)
- SuiteCRM (Administration settings)
- FrontAccounting (sys prefs or DB tables)
- File-backed key/value stores (INI/JSON/XML/CSV/YAML)
- CSV (tabular record store)
- XML (record/document store)

Legacy migration helpers
------------------------

[](#legacy-migration-helpers)

To help migrate older FrontAccounting-oriented code that builds SQL from arrays (e.g. `select_array`, `where_array`, `fields_array`), ModulesDAO includes:

- `Ksfraser\ModulesDAO\Sql\LegacyArraySqlBuilder`
- `Ksfraser\ModulesDAO\Sql\BuiltQuery`

These helpers keep schema descriptions in the FA-specific package (e.g. `fa_classes`) while centralizing SQL construction in one place to eliminate duplication.

### Note on `Origin` and validation

[](#note-on-origin-and-validation)

Historically, many classes inherited from a shared `origin` base to get permissive setters/getters plus runtime validation helpers.

For ModulesDAO, the goal is narrower: adapters + query building. DTO validation should be handled via small validators/helpers (composition) rather than forcing DTOs/Repositories to inherit from `origin`.

Also, while a `ksfraser/origin` package exists, it currently uses newer PHP language features and should not be assumed compatible with PHP 7.3 without an explicit compatibility pass.

This is scaffolding intended to be expanded in the dedicated repo: [https://github.com/ksfraser/ksf\_ModulesDAO](https://github.com/ksfraser/ksf_ModulesDAO)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance88

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

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 ~19 days

Recently: every ~13 days

Total

10

Last Release

40d ago

Major Versions

v0.3.4 → v8.x-dev2026-05-14

PHP version history (2 changes)0.1.0PHP &gt;=7.4

v0.3.1PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![ksfraser](https://avatars.githubusercontent.com/u/54461925?v=4)](https://github.com/ksfraser "ksfraser (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ksfraser-ksf-modules-dao/health.svg)

```
[![Health](https://phpackages.com/badges/ksfraser-ksf-modules-dao/health.svg)](https://phpackages.com/packages/ksfraser-ksf-modules-dao)
```

###  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)
