-
Notifications
You must be signed in to change notification settings - Fork 0
/
services.yaml
48 lines (34 loc) · 1.42 KB
/
services.yaml
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
# If you're happy with the defaults, this file can be included as is in your project.
parameters:
# These parameters are provided by MessageBusPass
message_bus.permission_to_voter: ~
message_bus.permissions_by_message: ~
message_bus.message_to_handler: ~
services:
_defaults:
autowire: true
# interfaces
ICanBoogie\MessageBus\HandlerProvider:
alias: ICanBoogie\MessageBus\PSR\HandlerProviderWithContainer
ICanBoogie\MessageBus\Dispatcher:
alias: ICanBoogie\MessageBus\DispatcherWithHandlerProvider
ICanBoogie\MessageBus\Voter:
alias: ICanBoogie\MessageBus\VoterWithPermissions
ICanBoogie\MessageBus\VoterProvider:
alias: ICanBoogie\MessageBus\PSR\VoterProviderWithContainer
ICanBoogie\MessageBus\RestrictedDispatcher:
alias: ICanBoogie\MessageBus\RestrictedDispatcherWithVoter
# implementations
ICanBoogie\MessageBus\PSR\HandlerProviderWithContainer:
arguments:
- !tagged_locator { tag: message_bus.handler }
- '%message_bus.message_to_handler%'
ICanBoogie\MessageBus\DispatcherWithHandlerProvider: ~
ICanBoogie\MessageBus\VoterWithPermissions:
arguments:
$permissionsByMessage: '%message_bus.permissions_by_message%'
ICanBoogie\MessageBus\PSR\VoterProviderWithContainer:
arguments:
- !tagged_locator { tag: message_bus.voter, index_by: permission }
- '%message_bus.permission_to_voter%'
ICanBoogie\MessageBus\RestrictedDispatcherWithVoter: ~