mxmbsocket/lib/Ratchet/Application/WAMP/Command/Action/Event.php
Chris Boden aceb2c9006 WAMP Codes
Changed the WAMP codes back into constants.
Added the new Welcome constant (not yet implemented)
2012-01-20 17:48:35 -05:00

19 lines
522 B
PHP

<?php
namespace Ratchet\Application\WAMP\Command\Action;
use Ratchet\Resource\Command\Action\SendMessage;
use Ratchet\Application\WAMP\App as WAMP;
/**
* This is an event in the context of a topicURI
* This event (message) is to be sent to all subscribers of $uri
*/
class Event extends SendMessage {
/**
* @param ...
* @param string
* @return Event
*/
public function setEvent($uri, $msg) {
return $this->setMessage(json_encode(array(WAMP::MSG_EVENT, $uri, (string)$msg)));
}
}