diff --git a/lib/Ratchet/Application/WAMP/App.php b/lib/Ratchet/Application/WAMP/App.php index e0f79d9..a1c6f32 100644 --- a/lib/Ratchet/Application/WAMP/App.php +++ b/lib/Ratchet/Application/WAMP/App.php @@ -64,7 +64,9 @@ class App implements WebSocketAppInterface { break; case 2: - return $this->_app->onCall($from, $json[1], $json[2]); + array_shift($json); + array_unshift($json, $from); + return call_user_func_array(array($this->_app, 'onCall'), $json); break; case 5: diff --git a/lib/Ratchet/Application/WAMP/Command/Action/Event.php b/lib/Ratchet/Application/WAMP/Command/Action/Event.php index 2f4a389..77bc270 100644 --- a/lib/Ratchet/Application/WAMP/Command/Action/Event.php +++ b/lib/Ratchet/Application/WAMP/Command/Action/Event.php @@ -12,6 +12,6 @@ class Event extends SendMessage { * @param string */ public function setEvent($uri, $msg) { - $this->setMessage(json_encode(array(8, $uri, (string)$msg))); + return $this->setMessage(json_encode(array(8, $uri, (string)$msg))); } } \ No newline at end of file diff --git a/lib/Ratchet/Application/WAMP/ServerInterface.php b/lib/Ratchet/Application/WAMP/ServerInterface.php index 86b3df6..b636f2d 100644 --- a/lib/Ratchet/Application/WAMP/ServerInterface.php +++ b/lib/Ratchet/Application/WAMP/ServerInterface.php @@ -35,7 +35,7 @@ interface ServerInterface { * @param ... * @return Ratchet\Resource\Command\CommandInterface|null */ - function onCall(Connection $conn, $callID, $uri); + function onCall(); /** * A request to subscribe to a URI has been made