public function onPublish(Conn $conn, $topic, $event, array $exclude, array $eligible)
    {
        /*
         * $topic contains the FULL uri, so if anything extra was added to that, you can find out the full path based on that.
         */

        $topic->broadcast(array(
            "sender" => $conn->resourceId,
            "topic" => $topic->getId(),
            "event" => $event
        ));
    }
public function onPublish(Conn $conn, $topic, $event, array $exclude, array $eligible)
    {
        /*
         * $topic contains the FULL uri, so if anything extra was added to that, you can find out the full path based on that.
         */

        $topic->broadcast(array(
            "sender" => $conn->resourceId,
            "topic" => $topic->getId(),
            "event" => $event
        ));
    }
public function onPublish ( Conn $ conn , $ topic , $ event , array $ exclude , array $ eligible ) { /*
         * $topic contains the FULL uri, so if anything extra was added to that, you can find out the full path based on that.
         */ $ topic -> broadcast ( array ( "sender" => $ conn -> resourceId , "topic" => $ topic -> getId ( ) , "event" => $ event ) ) ; }
This will receive any Publish requests for this exact topic.

@param \Ratchet\ConnectionInterface $conn
@param $topic
@param $event
@param array $exclude
@param array $eligible
@return mixed|void
This will receive any Publish requests for this exact topic .