Свойство | Type | Description | |
---|---|---|---|
$aggregateTranslator | Prooph\EventStore\Aggregate\AggregateTranslator | ||
$aggregateType | |||
$eventStore | |||
$identityMap | array | ||
$oneStreamPerAggregate | boolean | ||
$snapshotStore | |||
$streamName |
Méthode | Description | |
---|---|---|
__construct ( |
||
addAggregateRoot ( object $eventSourcedAggregateRoot ) | ||
addPendingEventsToStream ( ) | Repository acts as listener on EventStore.commit.pre events In the listener method the repository checks its identity map for pending events and appends the events to the event stream. | |
extractAggregateVersion ( object $aggregateRoot ) : integer | ||
getAggregateRoot ( string $aggregateId ) : null | object | Returns null if no stream events can be found for aggregate root otherwise the reconstituted aggregate root |
Méthode | Description | |
---|---|---|
assertAggregateType ( object $eventSourcedAggregateRoot ) | ||
determineStreamName ( string | null $aggregateId ) : |
Default stream name generation. | |
enrichEventMetadata ( Prooph\Common\Messaging\Message $domainEvent, string $aggregateId ) : Prooph\Common\Messaging\Message | Add aggregate_id and aggregate_type as metadata to $domainEvent Override this method in an extending repository to add more or different metadata. | |
loadFromSnapshotStore ( string $aggregateId ) : null | object |
public __construct ( |
||
$eventStore | ||
$aggregateType | ||
$aggregateTranslator | Prooph\EventStore\Aggregate\AggregateTranslator | |
$snapshotStore | ||
$streamName | ||
$oneStreamPerAggregate | boolean |
public addAggregateRoot ( object $eventSourcedAggregateRoot ) | ||
$eventSourcedAggregateRoot | object |
public addPendingEventsToStream ( ) |
protected assertAggregateType ( object $eventSourcedAggregateRoot ) | ||
$eventSourcedAggregateRoot | object |
protected determineStreamName ( string | null $aggregateId ) : |
||
$aggregateId | string | null | |
Résultat |
protected enrichEventMetadata ( Prooph\Common\Messaging\Message $domainEvent, string $aggregateId ) : Prooph\Common\Messaging\Message | ||
$domainEvent | Prooph\Common\Messaging\Message | |
$aggregateId | string | |
Résultat | Prooph\Common\Messaging\Message |
public extractAggregateVersion ( object $aggregateRoot ) : integer | ||
$aggregateRoot | object | |
Résultat | integer |
protected AggregateTranslator,Prooph\EventStore\Aggregate $aggregateTranslator | ||
Résultat | Prooph\EventStore\Aggregate\AggregateTranslator |
protected AggregateType,Prooph\EventStore\Aggregate $aggregateType | ||
Résultat |
protected EventStore,Prooph\EventStore $eventStore | ||
Résultat |
protected SnapshotStore,Prooph\EventStore\Snapshot|null $snapshotStore | ||
Résultat |