ksfraser/ksf-modules-dao 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ksfraser/ksf-modules-dao

最新稳定版本:v0.3.4

Composer 安装命令:

composer require ksfraser/ksf-modules-dao

包简介

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

README 文档

README

Cross-platform DAO abstraction for KS Fraser modules.

Related docs (keep in sync)

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

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

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

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-06