From bb8b9852b8af2c8de4296ee335fe90320ccb59f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Mar 2022 05:08:32 +0100 Subject: [PATCH] Continued: - "get" SHOULD be exclusively for getters, not for fetching record from database or determining ("getting") something based on an other object MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../classes/handler/package/class_NetworkPackageHandler.php | 2 +- .../hub/classes/registry/socket/class_SocketRegistry.php | 4 ++-- .../interfaces/registry/socket/class_RegisterableSocket.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index 0156de74a..0b7f23a38 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -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))); diff --git a/application/hub/classes/registry/socket/class_SocketRegistry.php b/application/hub/classes/registry/socket/class_SocketRegistry.php index 7183d0705..f61a2340c 100644 --- a/application/hub/classes/registry/socket/class_SocketRegistry.php +++ b/application/hub/classes/registry/socket/class_SocketRegistry.php @@ -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; diff --git a/application/hub/interfaces/registry/socket/class_RegisterableSocket.php b/application/hub/interfaces/registry/socket/class_RegisterableSocket.php index d79698e80..a76ee2a08 100644 --- a/application/hub/interfaces/registry/socket/class_RegisterableSocket.php +++ b/application/hub/interfaces/registry/socket/class_RegisterableSocket.php @@ -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. -- 2.39.5