EventLogger

Class EventLogger

The LightMVC Auditor class logs aggregate events from a domain model.

package

Ascmvc\EventSourcing

Methods

EventLogger constructor.

__construct(\Ascmvc\AbstractApp $app, \Laminas\EventManager\EventManagerInterface &$eventManager, array $logParams) 

Arguments

$eventManager

\Laminas\EventManager\EventManagerInterface

$logParams

array

EventLogger destructor.

__destruct() 

Initializes the EventLogger object.

initialize() 

EventLogger listener method.

logEvent(\Laminas\EventManager\EventInterface $event) 
Throws
\Exception

Arguments

$event

\Laminas\EventManager\EventInterface

Properties

Contains an instance of the AbstractApp object.

app : \Ascmvc\AbstractApp
var

Type(s)

\Ascmvc\AbstractApp

Contains an instance of EventManagerInterface.

eventManager : \Laminas\EventManager\EventManagerInterface
var

Type(s)

\Laminas\EventManager\EventManagerInterface

Contains an instance of EntityManager.

entityManager : \Doctrine\ORM\EntityManager
var

Type(s)

\Doctrine\ORM\EntityManager

Contains a string signifying the name of the entity that is to be used.

entityName : string
var

Type(s)

string

Contains an instance of EntityRepository.

entityRepository : \Doctrine\ORM\EntityRepository
var

Type(s)

\Doctrine\ORM\EntityRepository

Contains an array of logging parameters.

logParams : array
var

Type(s)

array