PHP Class Sulu\Component\Websocket\AbstractWebsocketApp

Inheritance: implements Sulu\Component\Websocket\WebsocketAppInterface
ファイルを表示 Open project: sulu/sulu Class Usage Examples

Protected Properties

Property Type Description
$name string

Public Methods

Method Description
__construct ( Doctrine\Common\Cache\Cache $contextsCache ) initialize clients container.
__toString ( )
getName ( )
onClose ( Ratchet\ConnectionInterface $conn )
onError ( Ratchet\ConnectionInterface $conn, Exception $e )
onOpen ( Ratchet\ConnectionInterface $conn )

Protected Methods

Method Description
createContext ( Ratchet\ConnectionInterface $conn ) : Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface Returns new created websocket context object.
getContext ( Ratchet\ConnectionInterface $conn ) : Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface Returns websocket context for given connection.
saveContext ( Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context ) Saves websocket context.

Method Details

__construct() public method

initialize clients container.
public __construct ( Doctrine\Common\Cache\Cache $contextsCache )
$contextsCache Doctrine\Common\Cache\Cache

__toString() public method

public __toString ( )

createContext() protected method

Returns new created websocket context object.
protected createContext ( Ratchet\ConnectionInterface $conn ) : Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface
$conn Ratchet\ConnectionInterface
return Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface

getContext() protected method

Returns websocket context for given connection.
protected getContext ( Ratchet\ConnectionInterface $conn ) : Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface
$conn Ratchet\ConnectionInterface
return Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface

getName() public method

public getName ( )

onClose() public method

public onClose ( Ratchet\ConnectionInterface $conn )
$conn Ratchet\ConnectionInterface

onError() public method

public onError ( Ratchet\ConnectionInterface $conn, Exception $e )
$conn Ratchet\ConnectionInterface
$e Exception

onOpen() public method

public onOpen ( Ratchet\ConnectionInterface $conn )
$conn Ratchet\ConnectionInterface

saveContext() protected method

Saves websocket context.
protected saveContext ( Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
$context Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface

Property Details

$name protected_oe property

protected string $name
return string