WAMP Refactoring

WAMP refactoring to new namespacing
This commit is contained in:
Chris Boden 2012-01-31 22:07:57 -05:00
parent 2c976d0102
commit d4cf6c489a
3 changed files with 3 additions and 23 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
namespace Ratchet\Component\WAMP\Command\Action; namespace Ratchet\Component\WAMP\Command\Action;
use Ratchet\Resource\Command\Action\SendMessage; use Ratchet\Resource\Command\Action\SendMessage;
use Ratchet\Component\WAMP\App as WAMP; use Ratchet\Component\WAMP\WAMPServerComponent as WAMP;
/** /**
* Send a curie to uri mapping to the client * Send a curie to uri mapping to the client

View File

@ -1,7 +1,7 @@
<?php <?php
namespace Ratchet\Component\WAMP; namespace Ratchet\Component\WAMP;
use Ratchet\Component\ComponentInterface; use Ratchet\Component\ComponentInterface;
use Ratchet\Component\WebSocket\WebSocketAppInterface; use Ratchet\Component\WebSocket\WebSocketComponentInterface;
use Ratchet\Resource\ConnectionInterface; use Ratchet\Resource\ConnectionInterface;
use Ratchet\Resource\Command\Composite; use Ratchet\Resource\Command\Composite;
use Ratchet\Resource\Command\CommandInterface; use Ratchet\Resource\Command\CommandInterface;
@ -25,7 +25,7 @@ use Ratchet\Component\WAMP\Command\Action\Prefix;
* @link http://www.tavendo.de/autobahn/protocol.html * @link http://www.tavendo.de/autobahn/protocol.html
* @link https://raw.github.com/oberstet/Autobahn/master/lib/javascript/autobahn.js * @link https://raw.github.com/oberstet/Autobahn/master/lib/javascript/autobahn.js
*/ */
class WAMPServerComponent implements WebSocketAppInterface { class WAMPServerComponent implements WebSocketComponentInterface {
const MSG_WELCOME = 0; const MSG_WELCOME = 0;
const MSG_PREFIX = 1; const MSG_PREFIX = 1;
const MSG_CALL = 2; const MSG_CALL = 2;

View File

@ -9,26 +9,6 @@ use Ratchet\Resource\ConnectionInterface;
* @todo Thought: URI as class. Class has short and long version stored (if as prefix) * @todo Thought: URI as class. Class has short and long version stored (if as prefix)
*/ */
interface WAMPServerComponentInterface extends ComponentInterface { interface WAMPServerComponentInterface extends ComponentInterface {
/**
* When a new connection is opened it will be passed to this method
* @param Ratchet\Resource\Connection
*/
function onOpen(ConnectionInterface $conn);
/**
* The user closed their connection
* @param Ratchet\Resource\Connection
* @return Ratchet\Resource\Command\CommandInterface|null
*/
function onClose(ConnectionInterface $conn);
/**
* @param Ratchet\Resource\Connection
* @param \Exception
* @return Ratchet\Resource\Command\CommandInterface|null
*/
function onError(ConnectionInterface $conn, \Exception $e);
/** /**
* An RPC call has been received * An RPC call has been received
* @param Ratchet\Resource\Connection * @param Ratchet\Resource\Connection