]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 05:42:04 +0000 (06:42 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 05:42:04 +0000 (06:42 +0100)
- replaced some instances with newly introduced traits
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/discovery/recipient/class_BaseRecipientDiscovery.php
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/tasks/node/ping/class_NodePingTask.php
core

index 0591f214f9786dc70b9e16b93cec5da85e3f6246..1a1b2cdfbaf082891e87b8e2d20339315b59c090 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Discovery\Recipient\DiscoverableRecipient;
 use Org\Shipsimu\Hub\Factory\Lists\Recipient\RecipientListFactory;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Traits\Lists\ListableTrait;
 
 /**
  * A PackageRecipient discovery class
@@ -33,10 +33,8 @@ use Org\Mxchange\CoreFramework\Lists\Listable;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseRecipientDiscovery extends BaseNodeDiscovery implements DiscoverableRecipient {
-       /**
-        * Instance of the list
-        */
-       private $listInstance = NULL;
+       // Load traits
+       use ListableTrait;
 
        /**
         * Protected constructor
@@ -56,25 +54,6 @@ abstract class BaseRecipientDiscovery extends BaseNodeDiscovery implements Disco
                $this->setListInstance($listInstance);
        }
 
-       /**
-        * Setter for the list instance
-        *
-        * @param       $listInstance   A list of Listable
-        * @return      void
-        */
-       protected final function setListInstance (Listable $listInstance) {
-               $this->listInstance = $listInstance;
-       }
-
-       /**
-        * Getter for the list instance
-        *
-        * @return      $listInstance   A list of Listable
-        */
-       protected final function getListInstance () {
-               return $this->listInstance;
-       }
-
        /**
         * "Getter" for recipient iterator
         *
index cc8ed5ccc182d7345ffafb01a495495bd4cce6e7..bd011d371e020d22559d988793b83f972f5ddc97 100644 (file)
@@ -40,8 +40,8 @@ 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\Traits\Visitor\VisitorTrait;
 use Org\Mxchange\CoreFramework\Visitor\Visitable;
-use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
 // Import SPL stuff
 use \BadMethodCallException;
@@ -88,6 +88,7 @@ use \UnexpectedValueException;
 class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Receivable, Registerable, Visitable {
        // Load traits
        use CryptoTrait;
+       use VisitorTrait;
 
        /**
         * Package mask for compressing package data:
@@ -324,11 +325,6 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
         */
        private $compressorInstance = NULL;
 
-       /**
-        * Visitor handler instance
-        */
-       private $visitorInstance = NULL;
-
        /**
         * Protected constructor
         *
@@ -419,25 +415,6 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                return $this->compressorInstance;
        }
 
-       /**
-        * Setter for visitor instance
-        *
-        * @param       $visitorInstance        A Visitor instance
-        * @return      void
-        */
-       protected final function setVisitorInstance (Visitor $visitorInstance) {
-               $this->visitorInstance = $visitorInstance;
-       }
-
-       /**
-        * Getter for visitor instance
-        *
-        * @return      $visitorInstance        A Visitor instance
-        */
-       protected final function getVisitorInstance () {
-               return $this->visitorInstance;
-       }
-
        /**
         * Initialize all stackers
         *
index c16243450805f94c3f73b0bc7a1ce05aaa3b8845..6102ba8ec100c5aa73c91b29e7a45daed4f082b5 100644 (file)
@@ -7,9 +7,9 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
 use Org\Shipsimu\Hub\Task\BaseHubTask;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Lists\Listable;
 use Org\Mxchange\CoreFramework\Task\BaseTask;
 use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Traits\Lists\ListableTrait;
 use Org\Mxchange\CoreFramework\Visitor\Visitable;
 use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
@@ -36,10 +36,8 @@ use Org\Mxchange\CoreFramework\Visitor\Visitor;
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 class NodePingTask extends BaseHubTask implements Taskable, Visitable {
-       /**
-        * Instance of the list
-        */
-       private $listInstance = NULL;
+       // Load traits
+       use ListableTrait;
 
        /**
         * Protected constructor
@@ -73,25 +71,6 @@ class NodePingTask extends BaseHubTask implements Taskable, Visitable {
                return $taskInstance;
        }
 
-       /**
-        * Setter for the list instance
-        *
-        * @param       $listInstance   A list of Listable
-        * @return      void
-        */
-       protected final function setListInstance (Listable $listInstance) {
-               $this->listInstance = $listInstance;
-       }
-
-       /**
-        * Getter for the list instance
-        *
-        * @return      $listInstance   A list of Listable
-        */
-       protected final function getListInstance () {
-               return $this->listInstance;
-       }
-
        /**
         * Accepts the visitor to process the visitor
         *
diff --git a/core b/core
index c30da7e118a91b814adb6e997a1e4a39d0f1cba4..575accd328d27eccb2bf3caddb564b291e0780df 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit c30da7e118a91b814adb6e997a1e4a39d0f1cba4
+Subproject commit 575accd328d27eccb2bf3caddb564b291e0780df