]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 2 Mar 2022 04:08:32 +0000 (05:08 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 2 Mar 2022 04:08:32 +0000 (05:08 +0100)
- "get" SHOULD be exclusively for getters, not for fetching record from
  database or determining ("getting") something based on an other object

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/interfaces/registry/socket/class_RegisterableSocket.php

index 0156de74a2f7c37f6decd2d5dbe9e0653266bb4d..0b7f23a383ba64439f468367a9b6dfff817016e7 100644 (file)
@@ -719,7 +719,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                $sentBytes = 0;
 
                // Get the right connection instance
-               $infoInstance = $this->getRegistryInstance()->getInfoInstanceFromPackageInstance($packageInstance);
+               $infoInstance = $this->getRegistryInstance()->determineInfoInstanceByPackageInstance($packageInstance);
 
                // Test helper instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: infoInstance[]=%s', gettype($infoInstance)));
index 7183d0705eccd2799a4654ac5a0d273177b07cc6..f61a2340ce50e911cd83d66c8cc48ea0bddcf4d6 100644 (file)
@@ -278,12 +278,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
        }
 
        /**
-        * "Getter" for info instance from given package data
+        * Determines an information instance from a given package instance
         *
         * @param       $packageInstance        An instance of a DeliverablePackage class
         * @return      $infoInstance   An instance of a ShareableInfo class
         */
-       public function getInfoInstanceFromPackageInstance (DeliverablePackage $packageInstance) {
+       public function determineInfoInstanceByPackageInstance (DeliverablePackage $packageInstance) {
                // Init info instance
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: packageInstance=%s - CALLED!', $packageInstance));
                $infoInstance = NULL;
index d79698e801014febd90f878b4d812bcf823df238..a76ee2a08c33e7e5f704b29bfc613d98a169717b 100644 (file)
@@ -64,12 +64,12 @@ interface RegisterableSocket extends Registerable {
        function getRegisteredSocketResource (Listenable $listenerInstance);
 
        /**
-        * "Getter" for info instance from given package data
+        * Determines an infomation instance from a given package instance
         *
         * @param       $packageInstance        An instance of a DeliverablePackage class
         * @return      $infoInstance   An instance of a ShareableInfo class
         */
-       function getInfoInstanceFromPackageInstance (DeliverablePackage $packageInstance);
+       function determineInfoInstanceByPackageInstance (DeliverablePackage $packageInstance);
 
        /**
         * Checks whether a socket of a connection type 'incoming' is registered.