PHP Class Prooph\EventSourcing\EventStoreIntegration\AggregateRootDecorator

Author: Alexander Miertsch ([email protected])
Inheritance: extends Prooph\EventSourcing\AggregateRoot
Mostrar archivo Open project: prooph/event-sourcing Class Usage Examples

Public Methods

Method Description
extractAggregateId ( AggregateRoot $anAggregateRoot ) : string
extractAggregateVersion ( AggregateRoot $anAggregateRoot ) : integer
extractRecordedEvents ( AggregateRoot $anAggregateRoot ) : AggregateChanged[]
fromHistory ( string $arClass, Iterator $aggregateChangedEvents ) : AggregateRoot
newInstance ( ) : static
replayStreamEvents ( AggregateRoot $aggregateRoot, Iterator $events )

Protected Methods

Method Description
aggregateId ( ) : string

Method Details

aggregateId() protected method

protected aggregateId ( ) : string
return string representation of the unique identifier of the aggregate root

extractAggregateId() public method

public extractAggregateId ( AggregateRoot $anAggregateRoot ) : string
$anAggregateRoot Prooph\EventSourcing\AggregateRoot
return string

extractAggregateVersion() public method

public extractAggregateVersion ( AggregateRoot $anAggregateRoot ) : integer
$anAggregateRoot Prooph\EventSourcing\AggregateRoot
return integer

extractRecordedEvents() public method

public extractRecordedEvents ( AggregateRoot $anAggregateRoot ) : AggregateChanged[]
$anAggregateRoot Prooph\EventSourcing\AggregateRoot
return Prooph\EventSourcing\AggregateChanged[]

fromHistory() public method

public fromHistory ( string $arClass, Iterator $aggregateChangedEvents ) : AggregateRoot
$arClass string
$aggregateChangedEvents Iterator
return Prooph\EventSourcing\AggregateRoot

newInstance() public static method

public static newInstance ( ) : static
return static

replayStreamEvents() public method

public replayStreamEvents ( AggregateRoot $aggregateRoot, Iterator $events )
$aggregateRoot Prooph\EventSourcing\AggregateRoot
$events Iterator