for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Eole\Sandstone\Websocket;
use JMS\Serializer\ArrayTransformerInterface;
use Ratchet\Wamp\WampConnection;
use Ratchet\Wamp\Topic as BaseTopic;
class Topic extends BaseTopic
{
/**
* @var array
*/
protected $arguments;
* @var ArrayTransformerInterface
protected $normalizer;
* @param string $topicPath
* @param array $arguments
public function __construct($topicPath, array $arguments = array())
parent::__construct($topicPath);
$this->arguments = $arguments;
}
* @param ArrayTransformerInterface $normalizer
*
* @return self
public function setNormalizer(ArrayTransformerInterface $normalizer)
$this->normalizer = $normalizer;
return $this;
* {@InheritDoc}
* And normalize message using the serializer before send.
public function broadcast($msg, array $exclude = array(), array $eligible = array())
parent::broadcast($this->normalizer->toArray($msg), $exclude, $eligible);
* @param WampConnection $conn
* @param string $topic
public function onSubscribe(WampConnection $conn, $topic)
$topic
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$this->add($conn);
* @param string $event
public function onPublish(WampConnection $conn, $topic, $event)
$conn
$event
// noop
public function onUnSubscribe(WampConnection $conn, $topic)
$this->remove($conn);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.