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(3mo ago)03MITPHPPHP &gt;=7.3

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 1mo ago

READMEChangelogDependencies (1)Versions (6)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

29

—

LowBetter than 60% of packages

Maintenance83

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

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

Total

5

Last Release

92d ago

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 (1 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

[doctrine/orm

Object-Relational-Mapper for PHP

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

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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