prefixes[$uri] = $curie; } public function sendEvent($uri, $event) { } public function onCall(Connection $conn, $id, $uri) { } public function onOpen(Connection $conn) { $conn->WAMP = new \StdClass; $conn->WAMP->prefixes = array(); $conn->WAMP->subscriptions = array(); } /** * @{inherit} * @throws Exception * @throws JSONException */ public function onMessage(Connection $from, $msg) { if (null === ($json = @json_decode($msg, true))) { throw new JSONException; } if (!in_array($json[0], static::$_incoming)) { throw new Exception('Invalid message type'); } if ($json[0] == 1) { $this->addPrefix($conn, $json[2], $json[1]); } // Determine WAMP message type, call $_this->_app->on(); } public function __construct(ServerInterface $app) { $this->_app = $app; } public function onClose(Connection $conn) { // remove all prefixes associated with connection? or will those just be destroyed w/ Connection } public function onError(Connection $conn, \Exception $e) { } }