X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fregistry%2Fsocket%2Fclass_SocketRegistry.php;h=9686826bdc255db59cca450fc927c6b6551ef076;hp=b23086f811faadf165e879ad551269cf64c0717c;hb=c89cdd982baa6d3941f829f3916785e7069c4214;hpb=6536a4dda3b96201f7f5551dc5d42559cf8b453d diff --git a/inc/classes/main/registry/socket/class_SocketRegistry.php b/inc/classes/main/registry/socket/class_SocketRegistry.php index b23086f8..9686826b 100644 --- a/inc/classes/main/registry/socket/class_SocketRegistry.php +++ b/inc/classes/main/registry/socket/class_SocketRegistry.php @@ -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.');