More widen interface ProtocolHandler (which should be extended by listener and writer...
[core.git] / inc / classes / main / registry / socket / class_SocketRegistry.php
index b23086f811faadf165e879ad551269cf64c0717c..9686826bdc255db59cca450fc927c6b6551ef076 100644 (file)
@@ -61,27 +61,27 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         * Checks wether given socket resource is registered. If $socketResource is
         * false only the instance will be checked.
         *
-        * @param       $listenerInstance       An instance of a Listenable class
+        * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @param       $socketResource         A valid socket resource
         * @return      $isRegistered           Wether the given socket resource is registered
         */
-       public function isSocketRegistered (Listenable $listenerInstance, $socketResource) {
+       public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) {
                $this->partialStub('Not yet implemented.');
        }
 
        /**
         * Registeres given socket for listener or throws an exception if it is already registered
         *
-        * @param       $listenerInstance       An instance of a Listenable class
+        * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @param       $socketResource         A valid socket resource
         * @throws      SocketAlreadyRegisteredException        If the given socket is already registered
         * @return      void
         */
-       public function registerSocket (Listenable $listenerInstance, $socketResource) {
+       public function registerSocket (ProtocolHandler $protocolInstance, $socketResource) {
                // Is the socket already registered?
-               if ($this->isSocketRegistered($listenerInstance, $socketResource)) {
+               if ($this->isSocketRegistered($protocolInstance, $socketResource)) {
                        // Throw the exception
-                       throw new SocketAlreadyRegisteredException($listenerInstance, BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED);
+                       throw new SocketAlreadyRegisteredException($protocolInstance, BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED);
                } // END - if
 
                $this->partialStub('Not yet implemented.');
@@ -90,15 +90,15 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
        /**
         * Getter for given listener's socket resource
         *
-        * @param       $listenerInstance       An instance of a Listenable class
+        * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @return      $socketResource         A valid socket resource
         * @throws      NoSocketRegisteredException             If the requested socket is not registered
         */
-       public function getSocketResource (Listenable $listenerInstance) {
+       public function getSocketResource (ProtocolHandler $protocolInstance) {
                // The socket must be registered before we can return it
-               if (!$this->isSocketRegistered($listenerInstance, false)) {
+               if (!$this->isSocketRegistered($protocolInstance, false)) {
                        // Throw the exception
-                       throw new NoSocketRegisteredException ($listenerInstance, self::SOCKET_NOT_REGISTERED);
+                       throw new NoSocketRegisteredException ($protocolInstance, self::SOCKET_NOT_REGISTERED);
                } // END - if
 
                $this->partialStub('Not yet implemented.');