mxmbsocket/tests/helpers/Ratchet/Mock/ConnectionDecorator.php
2025-04-09 14:56:59 +08:00

23 lines
493 B
PHP

<?php
namespace mfmdevsystem\socket\Mock;
use mfmdevsystem\socket\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();
}
}