|
2 | 2 |
|
3 | 3 | namespace RabbitMqModule; |
4 | 4 |
|
| 5 | +use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory; |
| 6 | +use RabbitMqModule\Command; |
| 7 | + |
5 | 8 | return [ |
| 9 | + ConfigAbstractFactory::class => [ |
| 10 | + Command\ListConsumersCommand::class => [ |
| 11 | + 'config', |
| 12 | + ], |
| 13 | + ], |
6 | 14 | 'rabbitmq' => [ |
7 | 15 | 'connection' => [ |
8 | 16 | 'default' => [] |
|
19 | 27 | 'rpc_server' => 'RabbitMqModule\\Service\\RpcServerFactory', |
20 | 28 | 'rpc_client' => 'RabbitMqModule\\Service\\RpcClientFactory' |
21 | 29 | ], |
22 | | - 'console' => [ |
23 | | - 'router' => [ |
24 | | - 'routes' => [ |
25 | | - 'rabbitmq_module-setup-fabric' => [ |
26 | | - 'options' => [ |
27 | | - 'route' => 'rabbitmq setup-fabric', |
28 | | - 'defaults' => [ |
29 | | - 'controller' => 'RabbitMqModule\\Controller\\SetupFabricController', |
30 | | - 'action' => 'index' |
31 | | - ] |
32 | | - ] |
33 | | - ], |
34 | | - 'rabbitmq_module-list_consumers' => [ |
35 | | - 'options' => [ |
36 | | - 'route' => 'rabbitmq list consumers', |
37 | | - 'defaults' => [ |
38 | | - 'controller' => 'RabbitMqModule\\Controller\\ConsumerController', |
39 | | - 'action' => 'list' |
40 | | - ] |
41 | | - ] |
42 | | - ], |
43 | | - 'rabbitmq_module-consumer' => [ |
44 | | - 'options' => [ |
45 | | - 'route' => 'rabbitmq consumer <name> [--without-signals|-w]', |
46 | | - 'defaults' => [ |
47 | | - 'controller' => 'RabbitMqModule\\Controller\\ConsumerController', |
48 | | - 'action' => 'index' |
49 | | - ] |
50 | | - ] |
51 | | - ], |
52 | | - 'rabbitmq_module-rpc_server' => [ |
53 | | - 'options' => [ |
54 | | - 'route' => 'rabbitmq rpc_server <name> [--without-signals|-w]', |
55 | | - 'defaults' => [ |
56 | | - 'controller' => 'RabbitMqModule\\Controller\\RpcServerController', |
57 | | - 'action' => 'index' |
58 | | - ] |
59 | | - ] |
60 | | - ], |
61 | | - 'rabbitmq_module-stdin-producer' => [ |
62 | | - 'options' => [ |
63 | | - 'route' => 'rabbitmq stdin-producer <name> [--route=] <msg>', |
64 | | - 'defaults' => [ |
65 | | - 'controller' => 'RabbitMqModule\\Controller\\StdInProducerController', |
66 | | - 'action' => 'index' |
67 | | - ] |
68 | | - ] |
69 | | - ] |
70 | | - ] |
71 | | - ] |
72 | | - ], |
73 | | - 'controllers' => [ |
74 | | - 'factories' => [ |
75 | | - 'RabbitMqModule\\Controller\\SetupFabricController' => |
76 | | - 'RabbitMqModule\\Controller\\Factory\\SetupFabricControllerFactory', |
77 | | - 'RabbitMqModule\\Controller\\ConsumerController' => |
78 | | - 'RabbitMqModule\\Controller\\Factory\\ConsumerControllerFactory', |
79 | | - 'RabbitMqModule\\Controller\\RpcServerController' => |
80 | | - 'RabbitMqModule\\Controller\\Factory\\RpcServerControllerFactory', |
81 | | - 'RabbitMqModule\\Controller\\StdInProducerController' => |
82 | | - 'RabbitMqModule\\Controller\\Factory\\StdInProducerControllerFactory' |
83 | | - ], |
84 | | - ], |
85 | 30 | 'service_manager' => [ |
86 | 31 | 'invokables' => [ |
87 | 32 | 'RabbitMqModule\\Service\\RabbitMqService' => 'RabbitMqModule\\Service\\RabbitMqService', |
|
96 | 41 | ], |
97 | 42 | 'abstract_factories' => [ |
98 | 43 | 'RabbitMqModule\\Service\\AbstractServiceFactory' => 'RabbitMqModule\\Service\\AbstractServiceFactory' |
| 44 | + ], |
| 45 | + 'factories' => [ |
| 46 | + Command\ListConsumersCommand::class => ConfigAbstractFactory::class, |
| 47 | + Command\StartConsumerCommand::class => Command\Factory\ContainerAwareCommandFactory::class, |
| 48 | + Command\StartRpcServerCommand::class => Command\Factory\ContainerAwareCommandFactory::class, |
| 49 | + Command\PublishMessageCommand::class => Command\Factory\ContainerAwareCommandFactory::class, |
| 50 | + Command\SetupFabricCommand::class => Command\Factory\ContainerAwareCommandFactory::class, |
| 51 | + ], |
| 52 | + ], |
| 53 | + 'laminas-cli' => [ |
| 54 | + 'commands' => [ |
| 55 | + Command\ListConsumersCommand::getDefaultName() => Command\ListConsumersCommand::class, |
| 56 | + Command\StartConsumerCommand::getDefaultName() => Command\StartConsumerCommand::class, |
| 57 | + Command\StartRpcServerCommand::getDefaultName() => Command\StartRpcServerCommand::class, |
| 58 | + Command\PublishMessageCommand::getDefaultName() => Command\PublishMessageCommand::class, |
| 59 | + Command\SetupFabricCommand::getDefaultName() => Command\SetupFabricCommand::class, |
99 | 60 | ] |
100 | 61 | ] |
101 | 62 | ]; |
0 commit comments