mxmbsocket/tests/Ratchet/Tests/Mock/ConnectionDecorator.php
Chris Boden 4735218aa0 [BCB] Namespace changes
Removed the `Component` namespace
Removed the `Resource` namespace
Renamed components:
`IOServerComponent` => `IoServer`
`WebSocketComponent` => `WsServer`
`SessionComponent` => `SessionProvider`
`WAMPServerComponent` => `WampServer`
`IpBlackListComponent` => `IpBlackList`
`FlashPolicyComponent` => `FlashPolicy`
2012-05-08 23:14:28 -04:00

22 lines
474 B
PHP

<?php
namespace Ratchet\Tests\Mock;
use Ratchet\AbstractConnectionDecorator;
class ConnectionDecorator extends AbstractConnectionDecorator {
public $last = array(
'write' => ''
, 'end' => false
);
public function send($data) {
$this->last[__FUNCTION__] = $data;
$this->getConnection()->send($data);
}
public function close() {
$this->last[__FUNCTION__] = true;
$this->getConnection()->close();
}
}