priyank/doctrine-odm-audit
Composer 安装命令:
composer require priyank/doctrine-odm-audit
包简介
To Store New/old value as audit in database on flush event of ODM Doctrine
关键字:
README 文档
README
Basic useful feature list:
- To Store New/old value as audit in database on flush event of ODM Doctrine
You need to implement IAuditHandler interface. Provide this Implemented class object as parameter of constructor.
class OdmEventManager implements IAuditHandler{ public function getPersistantRevisionObject(RevisionInfo $revisionInfo){ $revisionDoc = new RevisionDoc(); //Store revision info details into revision document //Here you can store other details like action user infromatino in Revision document return $revisionDoc; } public function getNamespaceOfDoctrineObject(){ return "Doctrine\Document"; } public function isDeleteEventAuditEnabled() { return true; } public function isInsertEventAuditEnabled() { return true; } public function isRequireToStoreAudit($obj) { return ($obj instanceof UserDocument); } public function isUpdateEventAuditEnabled() { return true; } public function isUpsertEventAuditEnabled() { return true; }
$odmAuditEventManager = new OdmAuditEventManager(new OdmEventManager()); $eventManager = new EventManager(); $eventManager->addEventListener([Events::onFlush], $odmAuditEventManager);
统计信息
- 总下载量: 167
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-22