-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.php
63 lines (54 loc) · 2.06 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
return [
'cqrs' => [
'command_bus' => [
'cqrs_default' => [
'class' => CQRS\CommandHandling\SequentialCommandBus::class,
'handlers' => [
'CommandTypeA' => function ($command) {},
'CommandTypeB' => 'my_command_handler_alias',
'CommandTypeC' => ['my_command_handler_alias', 'methodName'],
],
'transaction_manager' => 'cqrs_default',
'event_publisher' => 'cqrs_default',
],
],
'event_publisher' => [
'cqrs_default' => [
'class' => CQRS\Plugin\Doctrine\EventHandling\Publisher\DoctrineEventPublisher::class,
'event_bus' => 'cqrs_default',
'identity_map' => 'cqrs_default',
'event_store' => 'cqrs_default',
'entity_manager' => 'doctrine.entity_manager.orm_default',
],
],
'event_bus' => [
'cqrs_default' => [
'class' => CQRS\EventHandling\SynchronousEventBus::class,
'handlers' => [
'EventTypeA' => function ($event, $metadata, $timestamp) {},
'EventTypeB' => 'my_event_handler_alias',
'EventTypeC' => ['my_event_handler_alias', 'methodName'],
],
],
],
'identity_map' => [
'cqrs_default' => [
'class' => CQRS\Plugin\Doctrine\EventHandling\Publisher\DoctrineIdentityMap::class,
'entity_manager' => 'doctrine.entity_manager.orm_default'
],
],
'event_store' => [
'cqrs_default' => [
'class' => CQRS\Plugin\Doctrine\EventStore\TableEventStore::class,
'serializer' => 'cqrs_default',
],
],
'serializer' => [
'cqrs_default' => [
'class' => CQRS\Serializer\JsonSerializer::class,
//'instance' => 'my_serializer_alias',
],
],
],
];