oihana/php-openedge
Composer 安装命令:
composer require oihana/php-openedge
包简介
Composable PHP toolkit for the Progress OpenEdge SQL database via ODBC. Bundles a functional query builder (predicates, casts, string/numeric/date functions, CASE expressions), document/edge models composed by traits, PSR-7 CRUD controllers, and Symfony Console commands. Built for read-heavy ERP int
关键字:
README 文档
README
Composable PHP toolkit for the Progress OpenEdge SQL database, accessed via ODBC. Part of the Oihana PHP ecosystem, this package bundles a functional query builder (predicates, casts, string/numeric/date functions, CASE expressions), document/edge models composed by traits, PSR-7 CRUD controllers, and Symfony Console commands — everything you need to build a read-heavy ERP integration end-to-end.
📚 Documentation
Full API reference (generated with phpDocumentor): https://bcommebois.github.io/oihana-php-openedge
User guides (FR + EN) live under wiki/.
📦 Installation
Requires PHP 8.4+ with the ext-pdo extension, and the Progress DataDirect OpenEdge ODBC driver installed on the host running the application. Install via Composer:
composer require oihana/php-openedge
✨ What you can do
- Build OpenEdge SQL queries with a fully functional API — column expressions, value/literal expressions, ORDER BY / LIMIT / GROUP BY, search conditions, predicates (basic, between, exists, in, like, null, quantified) — without ever concatenating strings.
- Cover every OpenEdge SQL function — string (
concat,substring,lpad,proArrayEscape, ...), numeric (abs,round,power,mod, ...), date (now,sysTimestamp, ...), conditional (coalesce,ifNull,nvl, ...), conversion (toChar,toDate,toNumber, ...), and the full ODBC cast catalogue (castBIGINT,castVARCHAR,castTIMESTAMP, ...). - Compose CASE expressions declaratively —
whenThenExpression(...),elseExpression(...), no string templates. - Apply value mutators through the
alters/pipeline —alterDate,alterKey,alterNumeric,alterString,alterConditional,alterConversion. - Persist and load documents through trait-composed models —
Documents,DocumentsList,DocumentsGet,DocumentsCount,DocumentsStreametc. — withbindExpressionplaceholders andSORTABLEwhitelisting baked in. - Plug controllers into any Slim-compatible PSR-15 stack via
DocumentsController(list, get, count) — read-only by default to match the typical ERP integration profile.
Under the hood
- A consistent set of typed enums and constants —
OpenEdgeFunctionType,OpenEdgeOperator, etc. — no magic strings anywhere. - Pure functional helpers, registered through Composer
autoload.filesso they are always available withoutuseboilerplate. - PDO-based — uses the standard
ext-pdo+ ODBC driver path, so it works the same way on Linux (DataDirect driver) and Windows (Progress ODBC driver) hosts. - Schema.org-friendly — models extend
org\schema\Thingfromoihana/php-schema, so JSON-LD output is natural.
✅ Running tests
Run all tests:
composer test
Run a specific test file:
composer test ./tests/oihana/openedge/db/helpers/functions/casts/CastVarCharTest.php
The unit tests cover the pure functional helpers — they do not require an ODBC driver or a live OpenEdge server. End-to-end smoke tests against a real OpenEdge instance live in the consuming application.
🛠️ Generate the documentation
We use phpDocumentor to generate documentation into the ./docs folder.
composer doc
🧾 License
Licensed under the Mozilla Public License 2.0 (MPL‑2.0).
👤 About the author
- Author: Marc ALCARAZ (aka eKameleon)
- Email:
marc@ooop.fr - Website:
https://www.ooop.fr
🔗 Related packages
| Package | Description |
|---|---|
| oihana/php-arango | Composable toolkit for ArangoDB — document/edge models, AQL helpers, controllers. |
| oihana/php-auth | Casbin RBAC + JWT/OIDC authorization toolkit. |
| oihana/php-commands | Symfony Console kernel and reusable command traits. |
| oihana/php-core | Core helpers and utilities shared across the ecosystem. |
| oihana/php-enums | Typed constants and enums — no more magic strings. |
| oihana/php-exceptions | Framework exceptions with consistent semantics. |
| oihana/php-http | HTTP helpers — client IP, cookies, route patterns. |
| oihana/php-reflect | Reflection and object hydration utilities. |
| oihana/php-schema | Schema.org constants and vocabulary. |
| oihana/php-system | Framework helpers — controllers, models, request handling. |
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2026-05-25
