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.3.4(4mo ago)016MITPHPPHP &gt;=7.3

Since Jan 19Pushed 1mo 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 today

READMEChangelogDependencies (1)Versions (8)Used By (0)

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

31

—

LowBetter than 66% of packages

Maintenance84

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity25

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

Recently: every ~28 days

Total

7

Last Release

36d 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.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

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

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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