mxmbsocket/tests/Ratchet/Tests/Mock/ConnectionDecorator.php
Chris Boden d30c8358ef [BCB] [WIP] Overhaul
React at the core of Ratchet, refs #6
Removed Commands (except WAMP), refs #22
Updated Guzzle to 2.4 branch, refs #20
Fixed some Hixie bugs, refs #21
2012-05-07 18:49:13 -04:00

22 lines
483 B
PHP

<?php
namespace Ratchet\Tests\Mock;
use Ratchet\Resource\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();
}
}