
Removed the `Component` namespace Removed the `Resource` namespace Renamed components: `IOServerComponent` => `IoServer` `WebSocketComponent` => `WsServer` `SessionComponent` => `SessionProvider` `WAMPServerComponent` => `WampServer` `IpBlackListComponent` => `IpBlackList` `FlashPolicyComponent` => `FlashPolicy`
32 lines
898 B
PHP
32 lines
898 B
PHP
<?php
|
|
namespace Ratchet\Tests\Mock;
|
|
use Ratchet\MessageComponentInterface;
|
|
use Ratchet\Tests\Mock\Socket as MockSocket;
|
|
use Ratchet\ConnectionInterface;
|
|
|
|
/**
|
|
* @todo Rename to MessageComponent
|
|
*/
|
|
class Component implements MessageComponentInterface {
|
|
public $last = array();
|
|
|
|
public function __construct(ComponentInterface $app = null) {
|
|
$this->last[__FUNCTION__] = func_get_args();
|
|
}
|
|
|
|
public function onOpen(ConnectionInterface $conn) {
|
|
$this->last[__FUNCTION__] = func_get_args();
|
|
}
|
|
|
|
public function onMessage(ConnectionInterface $from, $msg) {
|
|
$this->last[__FUNCTION__] = func_get_args();
|
|
}
|
|
|
|
public function onClose(ConnectionInterface $conn) {
|
|
$this->last[__FUNCTION__] = func_get_args();
|
|
}
|
|
|
|
public function onError(ConnectionInterface $conn, \Exception $e) {
|
|
$this->last[__FUNCTION__] = func_get_args();
|
|
}
|
|
} |