NullComponent.php 966 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Ratchet;
  3. use Ratchet\ConnectionInterface;
  4. use Ratchet\MessageComponentInterface;
  5. use Ratchet\WebSocket\WsServerInterface;
  6. use Ratchet\Wamp\WampServerInterface;
  7. class NullComponent implements MessageComponentInterface, WsServerInterface, WampServerInterface {
  8. public function onOpen(ConnectionInterface $conn) {}
  9. public function onMessage(ConnectionInterface $conn, $msg) {}
  10. public function onClose(ConnectionInterface $conn) {}
  11. public function onError(ConnectionInterface $conn, \Exception $e) {}
  12. public function onCall(ConnectionInterface $conn, $id, $topic, array $params) {}
  13. public function onSubscribe(ConnectionInterface $conn, $topic) {}
  14. public function onUnSubscribe(ConnectionInterface $conn, $topic) {}
  15. public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude = array(), array $eligible = array()) {}
  16. public function getSubProtocols() {
  17. return array();
  18. }
  19. }