PHP Class Prooph\EventStore\Metadata\MetadataEnricherPlugin

Inheritance: implements Prooph\EventStore\Plugin\Plugin
Afficher le fichier Open project: prooph/event-store Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Prooph\EventStore\Metadata\MetadataEnricher $metadataEnricher )
onEventStoreAppendToStream ( Prooph\Common\Event\ActionEvent $appendToStreamEvent ) Add event metadata on event store appendToStream.
onEventStoreCreateStream ( Prooph\Common\Event\ActionEvent $createEvent ) Add event metadata on event store createStream.
setUp ( EventStore $eventStore )

Private Methods

Méthode Description
handleRecordedEvents ( Iterator $events ) : Iterator This method takes domain events as argument which are going to be added to the event stream and add the metadata via the MetadataEnricher.

Method Details

__construct() public méthode

public __construct ( Prooph\EventStore\Metadata\MetadataEnricher $metadataEnricher )
$metadataEnricher Prooph\EventStore\Metadata\MetadataEnricher

onEventStoreAppendToStream() public méthode

Add event metadata on event store appendToStream.
public onEventStoreAppendToStream ( Prooph\Common\Event\ActionEvent $appendToStreamEvent )
$appendToStreamEvent Prooph\Common\Event\ActionEvent

onEventStoreCreateStream() public méthode

Add event metadata on event store createStream.
public onEventStoreCreateStream ( Prooph\Common\Event\ActionEvent $createEvent )
$createEvent Prooph\Common\Event\ActionEvent

setUp() public méthode

public setUp ( EventStore $eventStore )
$eventStore Prooph\EventStore\EventStore