PHP Class Sulu\Component\Websocket\MessageDispatcher\MessageDispatcher

Inheritance: implements Sulu\Component\Websocket\MessageDispatcher\MessageDispatcherInterface
Show file Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( Sulu\Component\Websocket\MessageDispatcher\MessageBuilderInterface $messageBuilder )
add ( $name, Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface $handler )
dispatch ( Ratchet\ConnectionInterface $conn, $name, array $message, array $options, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
onClose ( Ratchet\ConnectionInterface $conn, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )

Method Details

__construct() public method

public __construct ( Sulu\Component\Websocket\MessageDispatcher\MessageBuilderInterface $messageBuilder )
$messageBuilder Sulu\Component\Websocket\MessageDispatcher\MessageBuilderInterface

add() public method

public add ( $name, Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface $handler )
$handler Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface

dispatch() public method

public dispatch ( Ratchet\ConnectionInterface $conn, $name, array $message, array $options, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
$conn Ratchet\ConnectionInterface
$message array
$options array
$context Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface

onClose() public method

public onClose ( Ratchet\ConnectionInterface $conn, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
$conn Ratchet\ConnectionInterface
$context Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface