PHP Interface Prooph\EventStore\Aggregate\AggregateTranslator

Author: Alexander Miertsch ([email protected])
Exibir arquivo Open project: prooph/event-store Interface Usage Examples

Public Methods

Method Description
extractAggregateId ( object $eventSourcedAggregateRoot ) : string
extractAggregateVersion ( object $eventSourcedAggregateRoot ) : integer
extractPendingStreamEvents ( object $eventSourcedAggregateRoot ) : Prooph\Common\Messaging\Message[]
reconstituteAggregateFromHistory ( AggregateType $aggregateType, Iterator $historyEvents ) : object
replayStreamEvents ( $anEventSourcedAggregateRoot, Iterator $events )

Method Details

extractAggregateId() public method

public extractAggregateId ( object $eventSourcedAggregateRoot ) : string
$eventSourcedAggregateRoot object
return string

extractAggregateVersion() public method

public extractAggregateVersion ( object $eventSourcedAggregateRoot ) : integer
$eventSourcedAggregateRoot object
return integer

extractPendingStreamEvents() public method

public extractPendingStreamEvents ( object $eventSourcedAggregateRoot ) : Prooph\Common\Messaging\Message[]
$eventSourcedAggregateRoot object
return Prooph\Common\Messaging\Message[]

reconstituteAggregateFromHistory() public method

public reconstituteAggregateFromHistory ( AggregateType $aggregateType, Iterator $historyEvents ) : object
$aggregateType AggregateType
$historyEvents Iterator
return object reconstructed EventSourcedAggregateRoot

replayStreamEvents() public method

public replayStreamEvents ( $anEventSourcedAggregateRoot, Iterator $events )
$anEventSourcedAggregateRoot
$events Iterator