-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
6d895ad
commit f2c89e9
Showing
5 changed files
with
67 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/PdoEventSourcing/tests/Fixture/MultiplePersistenceStrategies/Logger.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Test\Ecotone\EventSourcing\Fixture\MultiplePersistenceStrategies; | ||
|
||
use Ecotone\EventSourcing\EventStreamEmitter; | ||
use Ecotone\Modelling\Attribute\EventHandler; | ||
|
||
final class Logger | ||
{ | ||
public const STREAM = 'log'; | ||
|
||
#[EventHandler(listenTo: BasketCreated::NAME)] | ||
public function whenBasketCreated(BasketCreated $event, EventStreamEmitter $emitter): void | ||
{ | ||
$emitter->linkTo(self::STREAM, [$event]); | ||
} | ||
|
||
#[EventHandler(listenTo: OrderCreated::NAME)] | ||
public function whenOrderCreated(OrderCreated $event, EventStreamEmitter $emitter): void | ||
{ | ||
$emitter->linkTo(self::STREAM, [$event]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters