Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
<?php
2
namespace Ratchet\Mock;
3
use Ratchet\MessageComponentInterface;
4
use Ratchet\WebSocket\WsServerInterface;
5
use Ratchet\ConnectionInterface;
6
 
7
class Component implements MessageComponentInterface, WsServerInterface {
8
    public $last = array();
9
 
10
    public $protocols = array();
11
 
12
    public function __construct(ComponentInterface $app = null) {
13
        $this->last[__FUNCTION__] = func_get_args();
14
    }
15
 
16
    public function onOpen(ConnectionInterface $conn) {
17
        $this->last[__FUNCTION__] = func_get_args();
18
    }
19
 
20
    public function onMessage(ConnectionInterface $from, $msg) {
21
        $this->last[__FUNCTION__] = func_get_args();
22
    }
23
 
24
    public function onClose(ConnectionInterface $conn) {
25
        $this->last[__FUNCTION__] = func_get_args();
26
    }
27
 
28
    public function onError(ConnectionInterface $conn, \Exception $e) {
29
        $this->last[__FUNCTION__] = func_get_args();
30
    }
31
 
32
    public function getSubProtocols() {
33
        return $this->protocols;
34
    }
35
}