PHP Class Prooph\EventStore\Metadata\MetadataEnricherPlugin

Inheritance: implements Prooph\EventStore\Plugin\Plugin
Show file Open project: prooph/event-store Class Usage Examples

Public Methods

Method 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

Method 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 method

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

onEventStoreAppendToStream() public method

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

onEventStoreCreateStream() public method

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

setUp() public method

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