PHP Class Prooph\EventStore\Aggregate\ConfigurableAggregateTranslator

Author: Alexander Miertsch ([email protected])
Inheritance: implements Prooph\EventStore\Aggregate\AggregateTranslator
显示文件 Open project: prooph/event-store Class Usage Examples

Public Methods

Method Description
__construct ( null | string $identifierMethodName = null, null | string $versionMethodName = null, null | string $popRecordedEventsMethodName = null, null | string $replayEventsMethodsName = null, null | string $staticReconstituteFromHistoryMethodName = null, null | callable $eventToMessageCallback = null, null | callable $messageToEventCallback = null )
extractAggregateId ( object $eventSourcedAggregateRoot ) : string
extractAggregateVersion ( object $eventSourcedAggregateRoot ) : integer
extractPendingStreamEvents ( object $eventSourcedAggregateRoot ) : Prooph\Common\Messaging\Message[]
reconstituteAggregateFromHistory ( AggregateType $aggregateType, Iterator $historyEvents ) : object
replayStreamEvents ( object $eventSourcedAggregateRoot, Iterator $events )

Method Details

__construct() public method

public __construct ( null | string $identifierMethodName = null, null | string $versionMethodName = null, null | string $popRecordedEventsMethodName = null, null | string $replayEventsMethodsName = null, null | string $staticReconstituteFromHistoryMethodName = null, null | callable $eventToMessageCallback = null, null | callable $messageToEventCallback = null )
$identifierMethodName null | string
$versionMethodName null | string
$popRecordedEventsMethodName null | string
$replayEventsMethodsName null | string
$staticReconstituteFromHistoryMethodName null | string
$eventToMessageCallback null | callable
$messageToEventCallback null | callable

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 ( object $eventSourcedAggregateRoot, Iterator $events )
$eventSourcedAggregateRoot object
$events Iterator