Cleanup
Removed reference to remaining ObservableInterface's and SocketInterface's
This commit is contained in:
parent
09a2fb8f81
commit
3363c08f36
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
namespace Ratchet\Application;
|
||||
//use Ratchet\ObserverInterface;
|
||||
use Ratchet\Resource\Connection;
|
||||
|
||||
interface ApplicationInterface /*extends ObserverInterface*/ {
|
||||
interface ApplicationInterface {
|
||||
/**
|
||||
* Decorator pattern
|
||||
* @param Ratchet\ObserverInterface Application to wrap in protocol
|
||||
|
@ -27,7 +27,7 @@ class App implements ApplicationInterface {
|
||||
protected $_app;
|
||||
|
||||
/**
|
||||
* @param Ratchet\ObserverInterface
|
||||
* @param Ratchet\Application\ApplicationInterface
|
||||
*/
|
||||
public function __construct(ApplicationInterface $application = null) {
|
||||
if (null === $application) {
|
||||
|
@ -15,7 +15,7 @@ use Ratchet\Application\WebSocket\Util\HTTP;
|
||||
* @link http://ca.php.net/manual/en/ref.http.php
|
||||
* @todo Make sure this works both ways (client/server) as stack needs to exist on client for framing
|
||||
* @todo Learn about closing the socket. A message has to be sent prior to closing - does the message get sent onClose event or CloseConnection command?
|
||||
* @todo Consider chaning this class to a State Pattern. If a ObserverInterface is passed in __construct, do what is there now. If it's an AppInterface change behaviour of socket interaction (onOpen, handshake, etc)
|
||||
* @todo Consider chaning this class to a State Pattern. If a WS App interface is passed use different state for additional methods used
|
||||
*/
|
||||
class App implements ApplicationInterface, ConfiguratorInterface {
|
||||
/**
|
||||
|
@ -1,8 +1,7 @@
|
||||
<?php
|
||||
namespace Ratchet\Application\WebSocket\Command\Action;
|
||||
use Ratchet\SocketInterface;
|
||||
use Ratchet\Resource\Command\Action\SendMessage;
|
||||
use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
class Disconnect extends SendMessage {
|
||||
protected $_code = 1000;
|
||||
@ -13,7 +12,7 @@ class Disconnect extends SendMessage {
|
||||
// re-do message based on code
|
||||
}
|
||||
|
||||
public function execute(ObserverInterface $scope = null) {
|
||||
public function execute(ApplicationInterface $scope = null) {
|
||||
parent::execute();
|
||||
$this->_socket->close();
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace Ratchet\Application\WebSocket\Command\Action;
|
||||
use Ratchet\Resource\Command\ActionTemplate;
|
||||
use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
class Ping extends ActionTemplate {
|
||||
public function execute(ObserverInterface $scope = null) {
|
||||
public function execute(ApplicationInterface $scope = null) {
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace Ratchet\Application\WebSocket\Command\Action;
|
||||
use Ratchet\Resource\Command\ActionTemplate;
|
||||
use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
class Pong extends ActionTemplate {
|
||||
public function execute(ObserverInterface $scope = null) {
|
||||
public function execute(ApplicationInterface $scope = null) {
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ namespace Ratchet;
|
||||
* Observable/Observer design pattern interface for handing events on a socket
|
||||
* @todo Consider an onDisconnect method for a server-side close()'ing of a connection - onClose would be client side close()
|
||||
* @todo Is this interface needed anymore?
|
||||
* @deprecated
|
||||
*/
|
||||
interface ObserverInterface {
|
||||
/**
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
namespace Ratchet\Resource\Command\Action;
|
||||
use Ratchet\Resource\Command\ActionTemplate;
|
||||
use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
/**
|
||||
* Null pattern - execution does nothing, something needs to be passed back though
|
||||
*/
|
||||
class Null extends ActionTemplate {
|
||||
public function execute(ObserverInterface $scope = null) {
|
||||
public function execute(ApplicationInterface $scope = null) {
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Ratchet\Resource\Command\Action;
|
||||
use Ratchet\Resource\Command\ActionTemplate;
|
||||
//use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
namespace Ratchet\Resource\Command;
|
||||
//use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
namespace Ratchet\Resource\Command;
|
||||
//use Ratchet\ObserverInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
class Composite extends \SplQueue implements CommandInterface {
|
||||
|
Loading…
Reference in New Issue
Block a user