프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$aggregateTranslator | Prooph\EventStore\Aggregate\AggregateTranslator | ||
$aggregateType | |||
$eventStore | |||
$identityMap | array | ||
$oneStreamPerAggregate | boolean | ||
$snapshotStore | |||
$streamName |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 |
protected enrichEventMetadata ( Prooph\Common\Messaging\Message $domainEvent, string $aggregateId ) : Prooph\Common\Messaging\Message | ||
$domainEvent | Prooph\Common\Messaging\Message | |
$aggregateId | string | |
리턴 | Prooph\Common\Messaging\Message |
public extractAggregateVersion ( object $aggregateRoot ) : integer | ||
$aggregateRoot | object | |
리턴 | integer |
protected AggregateTranslator,Prooph\EventStore\Aggregate $aggregateTranslator | ||
리턴 | Prooph\EventStore\Aggregate\AggregateTranslator |
protected AggregateType,Prooph\EventStore\Aggregate $aggregateType | ||
리턴 |
protected EventStore,Prooph\EventStore $eventStore | ||
리턴 |
protected SnapshotStore,Prooph\EventStore\Snapshot|null $snapshotStore | ||
리턴 |