PHP Class Sulu\Bundle\PreviewBundle\Websocket\PreviewMessageHandler

Inheritance: implements Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface
Show file Open project: sulu/sulu

Public Methods

Method Description
__construct ( Doctrine\ORM\EntityManagerInterface $entityManager, Sulu\Bundle\PreviewBundle\Preview\PreviewInterface $preview )
handle ( Ratchet\ConnectionInterface $conn, array $message, MessageHandlerContext $context )
onClose ( Ratchet\ConnectionInterface $conn, MessageHandlerContext $context )

Protected Methods

Method Description
execute ( MessageHandlerContext $context, $message )

Private Methods

Method Description
reconnect ( ) Reconnect to mysql.
render ( MessageHandlerContext $context, $message )
start ( MessageHandlerContext $context, array $message ) : array Start preview with given parameters.
stop ( MessageHandlerContext $context ) : array Stop preview for given context.
update ( MessageHandlerContext $context, array $message ) : array Update preview with given parameter.
updateContext ( MessageHandlerContext $context, array $message ) : array Update preview-context with given parameter.

Method Details

__construct() public method

public __construct ( Doctrine\ORM\EntityManagerInterface $entityManager, Sulu\Bundle\PreviewBundle\Preview\PreviewInterface $preview )
$entityManager Doctrine\ORM\EntityManagerInterface
$preview Sulu\Bundle\PreviewBundle\Preview\PreviewInterface

execute() protected method

protected execute ( MessageHandlerContext $context, $message )
$context Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext

handle() public method

public handle ( Ratchet\ConnectionInterface $conn, array $message, MessageHandlerContext $context )
$conn Ratchet\ConnectionInterface
$message array
$context Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext

onClose() public method

public onClose ( Ratchet\ConnectionInterface $conn, MessageHandlerContext $context )
$conn Ratchet\ConnectionInterface
$context Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext