PHP的非侵入式ORM
v0.0.1
2017-08-20 18:12 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-18 20:48:06 UTC
README
Conscribo开源 / Conscribo框架
Conscribo框架目前提供了一个名为DataStruct的对象关系模型。
Datastruct提供了一种将对象映射到SQL表的方法,并提供了一种轻松加载和存储对象的方式。
它被Conscribo(一个用于约700家组织的商业会计和成员管理SaaS应用)使用、开发和维护。
Datastruct具有以下特性
- Pure PHP
To ensure compatibility in a variety of environments and maximize IDE compatibility,
we do not use non php constructs (like phpdoc tags), and no modules that need to be installed.
- Non-conflicting
An object using Datastruct has it's own inheritance and does not need to extend some orm abstraction.
Datastruct is fully trait based, and applied where needed.
- Well defined
For various reasons, we like to define our own sql tables, and tell the orm how to use it.
Therefore, datastruct demands you define a typed classmember to sql table mapping.
- Performance
It is not the fastest orm, but thanks to lots of optimizations, can be
tuned to perform well in demanding environments.
Datastruct至少提供以下'功能'
- Create, read, update (but not delete) objects with members (fields) and store
them in tables in your database without any hassle. (ORM)
- Define fields of a variety of basic types, or create your own types if nessecary
- Multiple key handling: A class with a composite primary or foreign key is no problem.
- Multiple tables in 1 class (onetoone extensionjoin). use more than one table as
one table in one object
- Associative Array join in 1 class (onetomany extensionjoin). Use records from another
table as an array in an object
- Join Objects (onetomany objectjoin). Define relations with other "Datastruct ojects"
as members in your object
- Collect objects. Define Collections (or don't and use a virtualCollection) to
search, filter, sort, limit, create, read and update multiple objects.
- Extend your objects. Specialize your objects with extensions and their own "extended" field definitions
版本信息
-
0.0.1 初始导入。
CF的开发始于2014年,作为一个封闭源代码解决方案。2017年它成为开源,但仍有一些“怪癖”,使其依赖于其他Conscribo架构。它们将在稳定版本之前消失。
路线图
- 1.0.0 开源。为了使其适合公开使用,需要做一些事情:- 重新配置代码以在Conscribo外部运行。- 尽可能使其无配置。- 将代码注释翻译成英语。- 编写文档。- 编写单元测试(有一些可用,但它们测试的是Conscribo中的CF实现)- 编写一些使用示例