Merge branch 'main' of ssh://git.homelab.nestor-server.fr:2222/colgora/Mangarr
All checks were successful
Build and Deploy / deploy (push) Successful in 1m46s
All checks were successful
Build and Deploy / deploy (push) Successful in 1m46s
# Conflicts: # src/Domain/Manga/Application/CommandHandler/DeleteChapterHandler.php # src/Domain/Manga/Application/CommandHandler/EditMultipleChaptersHandler.php # src/Domain/Manga/Application/EventListener/ChapterImportedEventListener.php # src/Domain/Manga/Application/EventListener/VolumeImportedEventListener.php # src/Domain/Manga/Application/Response/ChapterResponse.php # src/Domain/Manga/Infrastructure/ApiPlatform/State/Provider/DeleteCbzProvider.php # src/Domain/Manga/Infrastructure/ApiPlatform/State/Provider/DeleteChapterProvider.php # src/Domain/Manga/Infrastructure/Persistence/Repository/LegacyChapterRepository.php
This commit is contained in:
21
src/Domain/Shared/Domain/Model/AggregateRoot.php
Normal file
21
src/Domain/Shared/Domain/Model/AggregateRoot.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Shared\Domain\Model;
|
||||
|
||||
abstract class AggregateRoot
|
||||
{
|
||||
private array $domainEvents = [];
|
||||
|
||||
protected function recordEvent(object $event): void
|
||||
{
|
||||
$this->domainEvents[] = $event;
|
||||
}
|
||||
|
||||
public function pullDomainEvents(): array
|
||||
{
|
||||
$events = $this->domainEvents;
|
||||
$this->domainEvents = [];
|
||||
|
||||
return $events;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user