src/Governor/Framework/EventSourcing/AbstractEventSourcedEntity.php 1 location
|
@@ 46-60 (lines=15) @@
|
| 43 |
|
/** |
| 44 |
|
* {@inheritdoc} |
| 45 |
|
*/ |
| 46 |
|
public function handleRecursively(DomainEventMessageInterface $event) |
| 47 |
|
{ |
| 48 |
|
$this->handle($event); |
| 49 |
|
|
| 50 |
|
if (null === $childEntities = $this->getChildEntities()) { |
| 51 |
|
return; |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
foreach ($childEntities as $child) { |
| 55 |
|
if (null !== $child) { |
| 56 |
|
$child->registerAggregateRoot($this->aggregateRoot); |
| 57 |
|
$child->handleRecursively($event); |
| 58 |
|
} |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
/** |
| 63 |
|
* {@inheritdoc} |
src/Governor/Framework/EventSourcing/AbstractEventSourcedAggregateRoot.php 1 location
|
@@ 102-116 (lines=15) @@
|
| 99 |
|
} |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
private function handleRecursively(DomainEventMessageInterface $event) |
| 103 |
|
{ |
| 104 |
|
$this->handle($event); |
| 105 |
|
|
| 106 |
|
if (null === $childEntities = $this->getChildEntities()) { |
| 107 |
|
return; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
foreach ($childEntities as $child) { |
| 111 |
|
if (null !== $child) { |
| 112 |
|
$child->registerAggregateRoot($this); |
| 113 |
|
$child->handleRecursively($event); |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
|
| 119 |
|
/** |