@@ 147-154 (lines=8) @@ | ||
144 | /** |
|
145 | * {@InheritDoc} |
|
146 | */ |
|
147 | public function onSubscribe(ConnectionInterface $conn, $topic) |
|
148 | { |
|
149 | $this->dispatch(ConnectionEvent::ON_SUBSCRIBE, new WampEvent($conn, $topic)); |
|
150 | ||
151 | $this->logger->info('Topic event', ['event' => 'subscribe', 'topic' => $topic]); |
|
152 | ||
153 | $this->getTopic($topic)->onSubscribe($conn, $topic); |
|
154 | } |
|
155 | ||
156 | /** |
|
157 | * {@InheritDoc} |
|
@@ 171-178 (lines=8) @@ | ||
168 | /** |
|
169 | * {@InheritDoc} |
|
170 | */ |
|
171 | public function onUnSubscribe(ConnectionInterface $conn, $topic) |
|
172 | { |
|
173 | $this->dispatch(ConnectionEvent::ON_UNSUBSCRIBE, new WampEvent($conn, $topic)); |
|
174 | ||
175 | $this->logger->info('Topic event', ['event' => 'unsubscribe', 'topic' => $topic]); |
|
176 | ||
177 | $this->getTopic($topic)->onUnSubscribe($conn, $topic); |
|
178 | } |
|
179 | ||
180 | /** |
|
181 | * {@InheritDoc} |
|
@@ 183-194 (lines=12) @@ | ||
180 | /** |
|
181 | * {@InheritDoc} |
|
182 | */ |
|
183 | public function onClose(ConnectionInterface $conn) |
|
184 | { |
|
185 | $this->dispatch(ConnectionEvent::ON_CLOSE, new ConnectionEvent($conn)); |
|
186 | ||
187 | $this->logger->info('Connection event', ['event' => 'close']); |
|
188 | ||
189 | foreach ($this->topics as $topic) { |
|
190 | if ($topic->has($conn)) { |
|
191 | $topic->onUnSubscribe($conn, $topic); |
|
192 | } |
|
193 | } |
|
194 | } |
|
195 | ||
196 | /** |
|
197 | * {@InheritDoc} |