2017 © Pedro Peláez
 

library doctrine-odm-audit

To Store New/old value as audit in database on flush event of ODM Doctrine

image

priyank/doctrine-odm-audit

To Store New/old value as audit in database on flush event of ODM Doctrine

  • Monday, June 25, 2018
  • by Priyank780
  • Repository
  • 1 Watchers
  • 0 Stars
  • 87 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 10 % Grown

The README.md

Doctrine ODM Audit

Codacy Badge Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*1)

Basic useful feature list:, (*2)

  • 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., (*3)

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);

The Versions

25/06 2018

dev-master

9999999-dev

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

25/06 2018

1.0.6

1.0.6.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

22/01 2017

1.0.5

1.0.5.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

22/01 2017

1.0.3

1.0.3.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

21/01 2017

1.0.2

1.0.2.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

21/01 2017

1.0.1

1.0.1.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit

21/01 2017

1.0

1.0.0.0

To Store New/old value as audit in database on flush event of ODM Doctrine

  Sources   Download

MIT

The Requires

 

by Priyank

doctrine odm audit