1+ <?xml version =" 1.0" ?>
2+
3+ <container xmlns =" http://symfony.com/schema/dic/services"
4+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5+ xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" >
6+
7+ <services >
8+
9+ <service id =" voryx.thruway.loop" class =" React\EventLoop\LoopInterface" >
10+ <factory class =" React\EventLoop\Factory" method =" create" />
11+ </service >
12+
13+ <service id =" voryx.thruway.ratchet.transport"
14+ class =" Thruway\Transport\RatchetTransportProvider"
15+ public =" false" >
16+ <argument type =" expression" >parameter('voryx_thruway')['router']['ip']</argument >
17+ <argument type =" expression" >parameter('voryx_thruway')['router']['port']</argument >
18+ </service >
19+
20+ <service id =" voryx.thruway.client"
21+ class =" Thruway\Peer\Client" >
22+ <argument type =" expression" >parameter('voryx_thruway')['realm']</argument >
23+ </service >
24+
25+ <service id =" voryx.thruway.web.push.client"
26+ class =" Voryx\ThruwayBundle\Client\WebPushClient"
27+ public =" false" >
28+ <argument type =" expression" >parameter('voryx_thruway')['realm']</argument >
29+ </service >
30+
31+ <service id =" voryx.thruway.internal.transport"
32+ class =" Thruway\Transport\InternalClientTransportProvider"
33+ public =" false" >
34+ <argument type =" service" id =" voryx.thruway.client" />
35+ </service >
36+
37+ <service id =" voryx.thruway.internal.manager"
38+ class =" Thruway\Transport\InternalClientTransportProvider"
39+ public =" false" >
40+ </service >
41+
42+ <service id =" voryx.thruway.internal.web.push"
43+ class =" Thruway\Transport\InternalClientTransportProvider"
44+ public =" false" >
45+ <argument type =" service" id =" voryx.thruway.web.push.client" />
46+ </service >
47+
48+ <service id =" voryx.thruway.server" class =" Thruway\Peer\Router" public =" true" >
49+ <argument type =" service" id =" voryx.thruway.loop" />
50+ <call method =" addTransportProvider" >
51+ <argument type =" service" id =" voryx.thruway.ratchet.transport" />
52+ </call >
53+ <!-- <call method="addTransportProvider">-->
54+ <!-- <argument type="service" id="voryx.thruway.internal.transport"/>-->
55+ <!-- </call>-->
56+ </service >
57+
58+ <service id =" voryx.thruway.resource.mapper"
59+ class =" Voryx\ThruwayBundle\ResourceMapper" >
60+ <argument type =" service" id =" annotation_reader" />
61+ </service >
62+
63+ <service id =" get_set_stdClass_normalizer" class =" Voryx\ThruwayBundle\Serialization\StdClassNormalizer" public =" false" >
64+ <tag name =" serializer.normalizer" />
65+ </service >
66+
67+ <service id =" wamp_kernel" class =" Voryx\ThruwayBundle\WampKernel" public =" true" >
68+ <argument type =" service" id =" service_container" />
69+ <argument type =" service" id =" serializer" />
70+ <argument type =" service" id =" voryx.thruway.resource.mapper" />
71+ <argument type =" service" id =" event_dispatcher" />
72+ <argument type =" service" id =" logger" />
73+ </service >
74+
75+ <service id =" thruway_container" class =" Symfony\Component\DependencyInjection\Container" >
76+ <factory class =" Voryx\ThruwayBundle\ContainerFactory" method =" createContainer" />
77+ <argument type =" expression" >parameter('kernel.container_class')</argument >
78+ <argument type =" service" id =" thruway.client" />
79+ <argument type =" service" id =" voryx.thruway.loop" />
80+ <argument type =" service" id =" service_container" />
81+ </service >
82+
83+ <service id =" thruway.details" class =" Voryx\ThruwayBundle\Details" />
84+
85+ <!-- Authentication-->
86+ <service id =" voryx.thruway.authentication.manager"
87+ class =" Thruway\Authentication\AuthenticationManager"
88+ public =" false" >
89+ <argument type =" service" id =" voryx.thruway.client" />
90+ </service >
91+
92+ <service id =" voryx.thruway.auth.manager.transport.provider"
93+ class =" Thruway\Transport\InternalClientTransportProvider"
94+ public =" false" >
95+ <argument type =" service" id =" voryx.thruway.authentication.manager" />
96+ </service >
97+
98+ <service id =" voryx.thruway.user.db"
99+ class =" Voryx\ThruwayBundle\Authentication\UserDB"
100+ public =" false" >
101+ <argument type =" service" id =" service_container" />
102+ </service >
103+
104+ <service id =" voryx.thruway.wamp.cra.auth.client"
105+ class =" Thruway\Authentication\WampCraAuthProvider" >
106+ <argument type =" expression" >[parameter('voryx_thruway')['realm']]</argument >
107+ <call method =" setUserDb" >
108+ <argument type =" service" id =" voryx.thruway.user.db" />
109+ </call >
110+ </service >
111+
112+ <service id =" voryx.thruway.wamp.cra.auth.transport.provider"
113+ class =" Thruway\Transport\InternalClientTransportProvider" >
114+ <argument type =" service" id =" voryx.thruway.wamp.cra.auth.client" />
115+ </service >
116+
117+ <!-- Main Thruway Client-->
118+ <service id =" thruway.client"
119+ class =" Voryx\ThruwayBundle\Client\ClientManager" >
120+ <argument type =" service" id =" service_container" />
121+ <argument >%voryx_thruway%</argument >
122+ <argument type =" service" id =" serializer" />
123+ </service >
124+
125+ <service id =" voryx.thruway.topic_state_handler" class =" Voryx\ThruwayBundle\TopicStateHandler" >
126+ <tag name =" kernel.event_listener" event =" wamp.open" method =" onOpen" />
127+ </service >
128+
129+ <!-- Topic State Handler -->
130+ <service id =" voryx.thruway.topic.state.handler"
131+ class =" Thruway\Subscription\StateHandlerRegistry"
132+ public =" false" >
133+ <argument type =" expression" >parameter('voryx_thruway')['realm']</argument >
134+ <argument type =" service" id =" voryx.thruway.loop" />
135+ </service >
136+
137+ <!-- Register command as public services and enable autowiring -->
138+ <service id =" thruway.command.debug" class =" Voryx\ThruwayBundle\Command\ThruwayDebugCommand" public =" true" >
139+ <tag name =" console.command" command =" thruway:debug" />
140+ </service >
141+
142+ <service id =" thruway.command.process" class =" Voryx\ThruwayBundle\Command\ThruwayProcessCommand" public =" true" >
143+ <tag name =" console.command" command =" thruway:process" />
144+ </service >
145+
146+ <service id =" thruway.command.router" class =" Voryx\ThruwayBundle\Command\ThruwayRouterCommand" public =" true" >
147+ <tag name =" console.command" command =" thruway:router:start" />
148+ </service >
149+
150+ <service id =" thruway.command.worker" class =" Voryx\ThruwayBundle\Command\ThruwayWorkerCommand" public =" true" >
151+ <tag name =" console.command" command =" thruway:worker:start" />
152+ </service >
153+
154+ </services >
155+ </container >
0 commit comments