EventSourcedAggregateRepository
- Full name:
\Codefy\Domain\Aggregate\EventSourcedAggregateRepository
- This class implements:
\Codefy\Domain\Aggregate\AggregateRepository
Properties
eventStore
projection
Methods
__construct
public __construct(\Codefy\Domain\EventSourcing\EventStore $eventStore, \Codefy\Domain\EventSourcing\Projection $projection): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$eventStore | \Codefy\Domain\EventSourcing\EventStore | |
$projection | \Codefy\Domain\EventSourcing\Projection |
loadAggregateRoot
Loads an aggregate from the given aggregate id.
public loadAggregateRoot(\Codefy\Domain\Aggregate\AggregateId $aggregateId): \Codefy\Domain\Aggregate\RecordsEvents|null
Parameters:
Parameter | Type | Description |
---|---|---|
$aggregateId | \Codefy\Domain\Aggregate\AggregateId |
Throws:
saveAggregateRoot
Persist an aggregate.
Parameters:
Parameter | Type | Description |
---|---|---|
$aggregate | \Codefy\Domain\Aggregate\RecordsEvents |
Inherited methods
attachToIdentityMap
Attach an aggregate to the map.
Parameters:
Parameter | Type | Description |
---|---|---|
$aggregate | \Codefy\Domain\Aggregate\RecordsEvents |
retrieveFromIdentityMap
Retrieve an aggregate from the map by its aggregate id.
public retrieveFromIdentityMap(\Codefy\Domain\Aggregate\AggregateId $aggregateId): \Codefy\Domain\Aggregate\RecordsEvents|null
Parameters:
Parameter | Type | Description |
---|---|---|
$aggregateId | \Codefy\Domain\Aggregate\AggregateId |
clearIdentityMap
Clear the identity map.
removeFromIdentityMap
Remove aggregate from identity map.
Parameters:
Parameter | Type | Description |
---|---|---|
$aggregate | \Codefy\Domain\Aggregate\RecordsEvents |
enableIdentityMap
Set whether identity map is enabled.
Parameters:
Parameter | Type | Description |
---|---|---|
$bool | bool |
Automatically generated on 2025-10-13