From 13bc832d6dc06dc574353f1d34b4f7edd697bf53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Dec 2020 00:43:52 +0100 Subject: [PATCH] Continued: - REFACTURING: imported new traits, will have more in the future - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../frontend/node/class_NodeInformationDatabaseWrapper.php | 5 +---- .../hub/classes/handler/chunks/class_ChunkHandler.php | 4 ++++ .../classes/handler/package/class_NetworkPackageHandler.php | 4 ++++ application/hub/classes/nodes/class_BaseHubNode.php | 4 ++++ .../classes/package/fragmenter/class_PackageFragmenter.php | 4 ++++ application/hub/classes/source/class_BaseSource.php | 6 ++++++ core | 2 +- 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/application/hub/classes/database/frontend/node/class_NodeInformationDatabaseWrapper.php b/application/hub/classes/database/frontend/node/class_NodeInformationDatabaseWrapper.php index 7b463b2d7..702a228e3 100644 --- a/application/hub/classes/database/frontend/node/class_NodeInformationDatabaseWrapper.php +++ b/application/hub/classes/database/frontend/node/class_NodeInformationDatabaseWrapper.php @@ -96,12 +96,9 @@ class NodeInformationDatabaseWrapper extends BaseHubDatabaseWrapper implements N // Get a result back $resultInstance = $this->doSelectByCriteria($searchInstance); - // Set result instance in node instance - $nodeInstance->setResultInstance($resultInstance); - // Is it valid? $GLOBALS[__METHOD__] = $resultInstance->next(); - } // END - if + } // Return it return $GLOBALS[__METHOD__]; diff --git a/application/hub/classes/handler/chunks/class_ChunkHandler.php b/application/hub/classes/handler/chunks/class_ChunkHandler.php index 05eed6ee3..223a616b3 100644 --- a/application/hub/classes/handler/chunks/class_ChunkHandler.php +++ b/application/hub/classes/handler/chunks/class_ChunkHandler.php @@ -11,6 +11,7 @@ use Org\Shipsimu\Hub\Network\Package\Delivery\Fragment\PackageFragmenter; use Org\Mxchange\CoreFramework\Assertion\AssertionException; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; +use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; /** * A Chunk handler @@ -35,6 +36,9 @@ use Org\Mxchange\CoreFramework\Registry\Registerable; * along with this program. If not, see . */ class ChunkHandler extends BaseHubHandler implements HandleableChunks, Registerable { + // Load traits + use CryptoTrait; + /** * Stacker for chunks with final EOP */ diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index 779dfad0e..be6c3ad6c 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -39,6 +39,7 @@ use Org\Mxchange\CoreFramework\Feature\FrameworkFeature; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; +use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; @@ -85,6 +86,9 @@ use \UnexpectedValueException; * along with this program. If not, see . */ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Receivable, Registerable, Visitable { + // Load traits + use CryptoTrait; + /** * Package mask for compressing package data: * 0: Compressor extension diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index b1d9e0541..79024c1de 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -30,6 +30,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Task\Taskable; +use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; /** * A general hub node class @@ -54,6 +55,9 @@ use Org\Mxchange\CoreFramework\Task\Taskable; * along with this program. If not, see . */ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria { + // Load traits + use CryptoTrait; + /** * Node types */ diff --git a/application/hub/classes/package/fragmenter/class_PackageFragmenter.php b/application/hub/classes/package/fragmenter/class_PackageFragmenter.php index 8f3696bf1..acdf7946b 100644 --- a/application/hub/classes/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/classes/package/fragmenter/class_PackageFragmenter.php @@ -13,6 +13,7 @@ use Org\Mxchange\CoreFramework\Assertion\AssertionException; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; +use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; use Org\Mxchange\CoreFramework\Utils\String\StringUtils; /** @@ -47,6 +48,9 @@ use Org\Mxchange\CoreFramework\Utils\String\StringUtils; * along with this program. If not, see . */ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registerable { + // Load traits + use CryptoTrait; + /** * Cached chunk size in bits */ diff --git a/application/hub/classes/source/class_BaseSource.php b/application/hub/classes/source/class_BaseSource.php index c8d61f115..a635d5ff9 100644 --- a/application/hub/classes/source/class_BaseSource.php +++ b/application/hub/classes/source/class_BaseSource.php @@ -5,6 +5,9 @@ namespace Org\Shipsimu\Hub\Crawler\Source; // Import application-specific stuff use Org\Shipsimu\Hub\Generic\BaseHubSystem; +// Import framework stuff +use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; + /** * A general source class * @@ -28,6 +31,9 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem; * along with this program. If not, see . */ abstract class BaseSource extends BaseHubSystem { + // Load traits + use CryptoTrait; + /** * Protected constructor * diff --git a/core b/core index 2b0e7f20e..977b9bbb8 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 2b0e7f20e7d554a5675c3268db6de3dd3ab3421d +Subproject commit 977b9bbb804eda74ad2d819d1de082933dd0bb08 -- 2.39.5