rebelcode / entity-manager-interface
用于标准化实体管理器的接口包。
v0.1-alpha2
2018-10-10 09:14 UTC
Requires
- php: ^5.3.9 | ^7.0
- dhii/collections-interface: ^0.2-alpha4
- psr/container: ^1.0
Requires (Dev)
- codeclimate/php-test-reporter: <=0.3.2
- dhii/php-cs-fixer-config: dev-php-5.3
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- ptrofimov/xpmock: ^1.1
Suggests
- dhii/cqrs-resource-model-interface: Interfaces for building granular and flexible database abstraction
This package is auto-updated.
Last update: 2024-09-10 23:24:23 UTC
README
用于标准化实体管理器的接口包。
简介
此包提供了一组接口,用于对象(称为实体管理器)的管理实体。
这些接口旨在模仿典型的集合API,以使其与其他集合实现尽可能兼容。实际上,此包中的一些接口和方法是从 dhii/collections-interface
继承而来的。这是为了允许实体管理器能够与固定和临时形式的实体一起工作,例如数据库记录、临时计算结果或配置。
我们内部使用这些接口来隐藏我们对CQRS资源模型抽象的使用(见 dhii/cqrs-resource-model-interface
)。
通过实现这些接口,我们能够使消费者不受此数据库抽象的影响,而是与实体管理器实例进行读写操作。
需求
- PHP 5.3.9或更高版本
安装
使用composer (推荐)
composer require rebelcode/entity-manager-interface
自定义自动加载器
下载源代码,并参考您的自动加载器实现供应商如何添加自动加载规则。
此包中的所有接口都位于 RebelCode\Entity
命名空间下,位于 src
目录中,没有例外。
不使用composer
下载源代码,并在您的代码中 require
或 include
所需文件。
每个接口都存储在其同名文件中,不调用任何其他代码,这意味着这些文件100%安全用于包含。