Subversion Repositories php-qbpwcf

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
<?php
2
namespace Ratchet\Mock;
3
use Ratchet\Wamp\WampServerInterface;
4
use Ratchet\WebSocket\WsServerInterface;
5
use Ratchet\ConnectionInterface;
6
 
7
class WampComponent implements WampServerInterface, WsServerInterface {
8
    public $last = array();
9
 
10
    public $protocols = array();
11
 
12
    public function getSubProtocols() {
13
        return $this->protocols;
14
    }
15
 
16
    public function onCall(ConnectionInterface $conn, $id, $procURI, array $params) {
17
        $this->last[__FUNCTION__] = func_get_args();
18
    }
19
 
20
    public function onSubscribe(ConnectionInterface $conn, $topic) {
21
        $this->last[__FUNCTION__] = func_get_args();
22
    }
23
 
24
    public function onUnSubscribe(ConnectionInterface $conn, $topic) {
25
        $this->last[__FUNCTION__] = func_get_args();
26
    }
27
 
28
    public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude, array $eligible) {
29
        $this->last[__FUNCTION__] = func_get_args();
30
    }
31
 
32
    public function onOpen(ConnectionInterface $conn) {
33
        $this->last[__FUNCTION__] = func_get_args();
34
    }
35
 
36
    public function onClose(ConnectionInterface $conn) {
37
        $this->last[__FUNCTION__] = func_get_args();
38
    }
39
 
40
    public function onError(ConnectionInterface $conn, \Exception $e) {
41
        $this->last[__FUNCTION__] = func_get_args();
42
    }
43
}