]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 19 May 2017 14:25:49 +0000 (16:25 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:01 +0000 (18:50 +0200)
- imported Stateable
- renamed templates to closer name
- deleted duplicate (now in core framework) interface/template
- created namespaces

Signed-off-by: Roland Häder <roland@mxchange.org>
57 files changed:
application/hub/classes/communicator/class_BaseCommunicator.php
application/hub/classes/crawler/class_BaseNodeCrawler.php
application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php
application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php
application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php
application/hub/classes/states/communicator/active/class_CommunicatorActiveState.php
application/hub/classes/states/communicator/class_ [deleted file]
application/hub/classes/states/communicator/class_Communicator [new file with mode: 0644]
application/hub/classes/states/communicator/init/class_CommunicatorInitState.php
application/hub/classes/states/crawler/active/class_CrawlerActiveState.php
application/hub/classes/states/crawler/booting/class_CrawlerBootingState.php
application/hub/classes/states/crawler/class_ [deleted file]
application/hub/classes/states/crawler/class_Crawler [new file with mode: 0644]
application/hub/classes/states/crawler/init/class_CrawlerInitState.php
application/hub/classes/states/cruncher/class_ [deleted file]
application/hub/classes/states/cruncher/class_Cruncher [new file with mode: 0644]
application/hub/classes/states/cruncher/init/class_CruncherInitState.php
application/hub/classes/states/cruncher/virgin/class_CruncherVirginState.php
application/hub/classes/states/dht/active/class_DhtActiveState.php
application/hub/classes/states/dht/booting/class_DhtBootingState.php
application/hub/classes/states/dht/class_ [deleted file]
application/hub/classes/states/dht/class_Dht [new file with mode: 0644]
application/hub/classes/states/dht/init/class_DhtInitState.php
application/hub/classes/states/dht/virgin/class_DhtVirginState.php
application/hub/classes/states/miner/booting/class_MinerBootingState.php
application/hub/classes/states/miner/class_Miner
application/hub/classes/states/miner/init/class_MinerInitState.php
application/hub/classes/states/miner/virgin/class_MinerVirginState.php
application/hub/classes/states/node/active/class_NodeActiveState.php
application/hub/classes/states/node/announced/class_NodeAnnouncementCompletedState.php
application/hub/classes/states/node/announced/class_NodeAnnouncingState.php
application/hub/classes/states/node/class_ [deleted file]
application/hub/classes/states/node/class_BaseNodeState.php
application/hub/classes/states/node/class_Node [new file with mode: 0644]
application/hub/classes/states/node/init/class_NodeInitState.php
application/hub/classes/states/node/seniors/class_NodeReachableState.php
application/hub/classes/states/node/virgin/class_NodeVirginState.php
application/hub/classes/states/peer/class_
application/hub/classes/states/peer/connected/class_ConnectedPeerState.php
application/hub/classes/states/peer/errors/class_ConnectionRefusedPeerState.php
application/hub/classes/states/peer/errors/class_ConnectionTimedOutPeerState.php
application/hub/classes/states/peer/errors/class_NoRouteToHostPeerState.php
application/hub/classes/states/peer/errors/class_OperationAlreadyProgressPeerState.php
application/hub/classes/states/peer/errors/class_ProblemPeerState.php
application/hub/classes/states/peer/errors/class_TransportEndpointGonePeerState.php
application/hub/classes/states/peer/init/class_InitPeerState.php
application/hub/interfaces/crawler/class_Crawler.php
application/hub/interfaces/executor/class_Executor.php
application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php
application/hub/interfaces/producer/block/class_BlockProducer.php
application/hub/interfaces/producer/keys/class_KeyProducer.php
application/hub/interfaces/producer/work_units/class_UnitProducer.php
application/hub/interfaces/states/class_ [deleted file]
application/hub/interfaces/states/class_Stateable.php [deleted file]
application/hub/interfaces/states/client/class_ClientStateable.php
application/hub/interfaces/states/hub/class_HubStateable.php
application/hub/interfaces/states/peer/class_PeerStateable.php

index a16daf3df98ee74a54f29f25a26802ff48e06b6c..6eec1dbd7bf2af6965cfe0b24d5b9cd6656cbc3c 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\Communicator;
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A general communicator class
  *
index 590a222af5ae9e336ed9de9d5fc05172c4de6a93..ec1e885292e76dc62be12b1362247d869e532eb8 100644 (file)
@@ -7,6 +7,7 @@ use Hub\Generic\BaseHubSystem;
 
 // Import framework stuff
 use CoreFramework\Registry\Registry;
+use CoreFramework\State\Stateable;
 
 /**
  * A general NodeCrawler class
index 3078d680fba23c041aa1b6d0ca49732d99c9825c..83980750ea7d99932165bae90f3ede0eb79e60c8 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Producer\Cruncher\Key;
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registerable;
+use CoreFramework\State\Stateable;
 
 /**
  * A CruncherKey producer class
index 59d2bc3a0f377e3e5194041d9bc19c373e2bc972..21dd2f1f5e5f6d7864d0b917e0385825584f7e38 100644 (file)
@@ -6,6 +6,7 @@ namespace Hub\Cruncher\Producer\Unit;
 use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registerable;
+use CoreFramework\State\Stateable;
 
 /**
  * A CruncherTestUnit producer class
index 6006a215ac6d019ff09124dd64cc0459f1b64e6c..97b7f8e5c4fb1102883a20f8dcf39d86e41003d2 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Miner\Producer\Block\Genesis;
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registerable;
+use CoreFramework\State\Stateable;
 
 /**
  * A MinerRealGenesisBlock producer class
index 64267457da65a6dbaf6a109ebd41b104870dc43e..00d5e4088141abadd6845271716e2b8800abf853 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Communicator;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A active communicator state class
  *
diff --git a/application/hub/classes/states/communicator/class_ b/application/hub/classes/states/communicator/class_
deleted file mode 100644 (file)
index c50b540..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * A ??? communicator state class
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2014, 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class Communicator???State extends BaseCommunicatorState implements Stateable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Set state name
-               $this->setStateName('!!!');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @param       $communicatorInstance   An instance of a Communicator class
-        * @return      $stateInstance                  An instance of a Stateable class
-        */
-       public final static function createCommunicator???State (Communicator $communicatorInstance) {
-               // Get new instance
-               $stateInstance = new Communicator???State();
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
-               // Set the communicator instance
-               $stateInstance->setCommunicatorInstance($communicatorInstance);
-
-               // Return the prepared instance
-               return $stateInstance;
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/states/communicator/class_Communicator b/application/hub/classes/states/communicator/class_Communicator
new file mode 100644 (file)
index 0000000..a159a1a
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+// Own namespace
+namespace Hub\State\Communicator\;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
+/**
+ * A ??? communicator state class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2014, 2015 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Communicator???State extends BaseCommunicatorState implements Stateable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set state name
+               $this->setStateName('!!!');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $communicatorInstance   An instance of a Communicator class
+        * @return      $stateInstance                  An instance of a Stateable class
+        */
+       public final static function createCommunicator???State (Communicator $communicatorInstance) {
+               // Get new instance
+               $stateInstance = new Communicator???State();
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+
+               // Set the communicator instance
+               $stateInstance->setCommunicatorInstance($communicatorInstance);
+
+               // Return the prepared instance
+               return $stateInstance;
+       }
+}
+
+// [EOF]
+?>
index 30d3a628d5e860b9be0f64d5e81c1754bf0cd443..d3f166e4b2fd59ee8d8e362205ac3bb63c22e338 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Communicator;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A init communicator state class
  *
index 5abe587235ec85ed3c4dc0b40f2142a4888d742c..647f1b1866ff0fbf908fb10bcef6c7fd25442c27 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Crawler;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A active crawler state class
  *
index 6edbdbbd78aa94116e40effc07bffc9fc8cf5663..684f3262e86fad7a1321cef93cba3d6b09d06751 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Crawler;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A booting crawler state class
  *
diff --git a/application/hub/classes/states/crawler/class_ b/application/hub/classes/states/crawler/class_
deleted file mode 100644 (file)
index 7579778..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * A ??? crawler state class
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2014 Crawler Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class Crawler???State extends BaseCrawlerState implements Stateable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Set state name
-               $this->setStateName('!!!');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @param       $crawlerInstance        An instance of a Crawler class
-        * @return      $stateInstance                  An instance of a Stateable class
-        */
-       public final static function createCrawler???State (Crawler $crawlerInstance) {
-               // Get new instance
-               $stateInstance = new Crawler???State();
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
-               // Set the crawler instance
-               $stateInstance->setCrawlerInstance($crawlerInstance);
-
-               // Return the prepared instance
-               return $stateInstance;
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/states/crawler/class_Crawler b/application/hub/classes/states/crawler/class_Crawler
new file mode 100644 (file)
index 0000000..e1924dd
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+// Own namespace
+namespace Hub\State\Crawler\;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
+/**
+ * A ??? crawler state class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2014 Crawler Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Crawler???State extends BaseCrawlerState implements Stateable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set state name
+               $this->setStateName('!!!');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $crawlerInstance        An instance of a Crawler class
+        * @return      $stateInstance                  An instance of a Stateable class
+        */
+       public final static function createCrawler???State (Crawler $crawlerInstance) {
+               // Get new instance
+               $stateInstance = new Crawler???State();
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMMUNICATOR-STATE: Has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+
+               // Set the crawler instance
+               $stateInstance->setCrawlerInstance($crawlerInstance);
+
+               // Return the prepared instance
+               return $stateInstance;
+       }
+}
+
+// [EOF]
+?>
index fffd219edbf79ee00dae98dcbe2fedd6c8e0a19a..6c7cdd07d9e05f6d2b0b5c91f29276d1cdbc4be0 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Crawler;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A init crawler state class
  *
diff --git a/application/hub/classes/states/cruncher/class_ b/application/hub/classes/states/cruncher/class_
deleted file mode 100644 (file)
index 03b5bc2..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * A ??? cruncher state class
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2011 - 2012 Cruncher Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class Cruncher???State extends BaseCruncherState implements Stateable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Set state name
-               $this->setStateName('!!!');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @param       $cruncherInstance       An instance of a CruncherHelper class
-        * @return      $stateInstance  An instance of a Stateable class
-        */
-       public final static function createCruncher???State (CruncherHelper $cruncherInstance) {
-               // Get new instance
-               $stateInstance = new Cruncher???State();
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRUNCHER-STATE: Has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
-               // Set the cruncher instance
-               $stateInstance->setCruncherInstance($cruncherInstance);
-
-               // Return the prepared instance
-               return $stateInstance;
-       }
-
-       /**
-        * Executes the state with given Executor instance
-        *
-        * @param       $executorInstance       An instance of a Executor class
-        * @return      void
-        */
-       public function executeState (Executor $executorInstance) {
-               $this->partialStub('This state needs implementation. executorInstance=' . $executorInstance->__toString());
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/states/cruncher/class_Cruncher b/application/hub/classes/states/cruncher/class_Cruncher
new file mode 100644 (file)
index 0000000..1182d6a
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+// Own namespace
+namespace Hub\State\Cruncher\;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
+/**
+ * A ??? cruncher state class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2011 - 2012 Cruncher Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Cruncher???State extends BaseCruncherState implements Stateable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set state name
+               $this->setStateName('!!!');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $cruncherInstance       An instance of a CruncherHelper class
+        * @return      $stateInstance  An instance of a Stateable class
+        */
+       public final static function createCruncher???State (CruncherHelper $cruncherInstance) {
+               // Get new instance
+               $stateInstance = new Cruncher???State();
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRUNCHER-STATE: Has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+
+               // Set the cruncher instance
+               $stateInstance->setCruncherInstance($cruncherInstance);
+
+               // Return the prepared instance
+               return $stateInstance;
+       }
+
+       /**
+        * Executes the state with given Executor instance
+        *
+        * @param       $executorInstance       An instance of a Executor class
+        * @return      void
+        */
+       public function executeState (Executor $executorInstance) {
+               $this->partialStub('This state needs implementation. executorInstance=' . $executorInstance->__toString());
+       }
+}
+
+// [EOF]
+?>
index 8c1938590e4949c01bee3ce1424105c9cfffc142..22d0ca66cac0886cc00f75b88c9dd4426165c5e7 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Cruncher;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Init cruncher state class
  *
index a5d2f15de49b9da659c532b6ae5362785a11507d..9dce0225bf239b55cc71988d5f78e49ef557a455 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Cruncher;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Virgin cruncher state class
  *
index fded634ca4a7e4b8dec82b64a75bcc48a7822659..a3215ade8a0c274fdcd4eb005ba11b369f989957 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Dht;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Active dht state class
  *
index 91493f013a9eeb62796dfa00bb1d86ef036d6434..ebb9d28c42810fe5c5dcb86078247152e407cb7e 100644 (file)
@@ -1,10 +1,13 @@
 <?php
 // Own namespace
-namespace Hub\State\Dht\Booting;
+namespace Hub\State\Dht;
 
 // Import application-specific stuff
 use Hub\Factory\Node\NodeObjectFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Booting dht state class
  *
diff --git a/application/hub/classes/states/dht/class_ b/application/hub/classes/states/dht/class_
deleted file mode 100644 (file)
index 01bb0c5..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * A ??? dht state class
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class Dht???State extends BaseDhtState implements Stateable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Set state name
-               $this->setStateName('!!!');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @param       $dhtInstance    An instance of a Distributable class
-        * @return      $stateInstance  An instance of a Stateable class
-        */
-       public final static function createDht???State (Distributable $dhtInstance) {
-               // Get new instance
-               $stateInstance = new Dht???State();
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
-               // Set the dht instance
-               $stateInstance->setDhtInstance($dhtInstance);
-
-               // Return the prepared instance
-               return $stateInstance;
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/states/dht/class_Dht b/application/hub/classes/states/dht/class_Dht
new file mode 100644 (file)
index 0000000..d885f71
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+// Own namespace
+namespace Hub\State\Dht\;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
+/**
+ * A ??? dht state class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Dht???State extends BaseDhtState implements Stateable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set state name
+               $this->setStateName('!!!');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $dhtInstance    An instance of a Distributable class
+        * @return      $stateInstance  An instance of a Stateable class
+        */
+       public final static function createDht???State (Distributable $dhtInstance) {
+               // Get new instance
+               $stateInstance = new Dht???State();
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-STATE: Has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+
+               // Set the dht instance
+               $stateInstance->setDhtInstance($dhtInstance);
+
+               // Return the prepared instance
+               return $stateInstance;
+       }
+}
+
+// [EOF]
+?>
index 4a6ac153bd2f8f7155bfac90ac84a29a557171ec..d0d7c97706e0e7c091ea58ef326e0f745e3452cc 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Dht;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Init dht state class
  *
index 2d3da3ca656246691f382eca122064ce17e93725..1a37f3a8f2204ee8b74fbb365c32f641dfdbf360 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Dht;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Virgin dht state class
  *
index 8886af1859b1a302ecca17997c25a8ba2ccb68db..c0b037579910a2ffd664b4124f75ac5f934d3261 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Miner;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Booting miner state class
  *
index b2020ce94e9282e1cb45965163df02e8ae281dd1..3e6bb8594dd3d23cc1606b65eb3c2ae2d886254a 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Miner\;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A ??? miner state class
  *
index 1b687ebd51badcf92aef661068953bd57a69b8e4..e123723d48c4c2e3b5ebcd5d4c7162d3988bd4b1 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Miner;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Init miner state class
  *
index 40340a67d9dae336b58d6b2675f5c4ce38a3cf90..f2e9e84e46ef5c9186e371f906ee0454b6cd9ad9 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Miner;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Virgin miner state class
  *
index d7d5197e203eb2e2f9e866b9f2d2d82b31cd7eac..71739508d04f34d0da8ec84d02d8061697468c0c 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\State\Node;
 // Import framework stuff
 use Hub\Factory\State\Node\NodeStateFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An active node state class
  *
index f9fdba626ac3c296218addafb493436d6359df04..9120d542d83a82f2b9403a4c2d58de987aabb7be 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Node;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A AnnouncementCompleted node state class
  *
index 5f5ccc1dd48ed2ee670084d8abb408989715db63..702b2f636c39f295d270891569a8b6bf877ba4b6 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\State\Node;
 // Import framework stuff
 use Hub\Factory\State\Node\NodeStateFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Announcing node state class
  *
diff --git a/application/hub/classes/states/node/class_ b/application/hub/classes/states/node/class_
deleted file mode 100644 (file)
index 1fee62d..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-// Own namespace
-namespace Hub\Node\State\;
-
-// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-
-/**
- * A ??? node state class
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-class Node???State extends BaseNodeState implements Stateable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Set state name
-               $this->setStateName('!!!');
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @param       $nodeInstance   An instance of a NodeHelper class
-        * @return      $stateInstance  An instance of a Stateable class
-        */
-       public final static function createNode???State (NodeHelper $nodeInstance) {
-               // Get new instance
-               $stateInstance = new Node???State();
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
-               // Set the node instance
-               $stateInstance->setNodeInstance($nodeInstance);
-
-               // Return the prepared instance
-               return $stateInstance;
-       }
-}
-
-// [EOF]
-?>
index 171331df865a0b3910575f14585b35c82cea9406..ee234276496618bfb9dc13101d1fb85fc0a5be59 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Node;
+
+// Import framework stuff
+use CoreFramework\State\BaseState;
+
 /**
  * A general node state class
  *
diff --git a/application/hub/classes/states/node/class_Node b/application/hub/classes/states/node/class_Node
new file mode 100644 (file)
index 0000000..bee5850
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+// Own namespace
+namespace Hub\State\Node\;
+
+// Import application-specific stuff
+use Hub\Helper\Node\NodeHelper;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
+/**
+ * A ??? node state class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Node???State extends BaseNodeState implements Stateable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set state name
+               $this->setStateName('!!!');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $stateInstance  An instance of a Stateable class
+        */
+       public final static function createNode???State (NodeHelper $nodeInstance) {
+               // Get new instance
+               $stateInstance = new Node???State();
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
+
+               // Set the node instance
+               $stateInstance->setNodeInstance($nodeInstance);
+
+               // Return the prepared instance
+               return $stateInstance;
+       }
+}
+
+// [EOF]
+?>
index b5c9b439a5b309e72ca8d9adabc6f5682428a7d4..6e209798176476b279b4275b850688e2dcdd7648 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\State\Node;
 // Import framework stuff
 use Hub\Factory\State\Node\NodeStateFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A init node state class
  *
index 2f311140df55cbc63636fb67c004836727583546..92716831a633cc8a2c5197e4253dead19c6b70fd 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\State\Node;
 // Import framework stuff
 use Hub\Factory\State\Node\NodeStateFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Reachable node state class
  *
index 68c3ce622c0c37bc3975ac683dda12751cbbde49..c9ce7e4232c2daa4c0be2bfac4e2f4476a00a1a3 100644 (file)
@@ -5,6 +5,9 @@ namespace Hub\State\Node;
 // Import framework stuff
 use Hub\Factory\State\Node\NodeStateFactory;
 
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A virgin node state class
  *
index 850482bc8ec6eb869881495a45ade859cc50fccd..52b4de7de40fc88d6344e23dea62efc3f66ee5d8 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A ??? peer state class
  *
index 5080888d2d2520f4085b8533913bd174a8c11f6a..1fc6279f585903648bc96c8f9e0b3a497d7d8741 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Connected peer state class
  *
index 813a703cbf4dd97f8641dcb5db86a76f7d2230ec..012916ada08f89048508a80101e2e890c435ab70 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A ConnectionRefused peer state class
  *
index 40f91a6c8134ea8bc5b878eaf1e77ef7d3717ba0..41354bc7a714961cf2a9d49d80d2b2d47d0d4c89 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A ConnectionTimedOut peer state class
  *
index a8c69784f53274389dbb8f17561d970ea04cb923..9728a24df26debb910ce76204ac0618ffbc15851 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A NoRouteToHost peer state class
  *
index 9491ef79e82d5bf6fc1c399b2a3c34595bab5991..ba3f7e86fd29e3ee5ad8290cc108a3aa8b0c5fb6 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A OperationAlreadyProgress peer state class
  *
index 06dbb9d57c58ff2f9f97a0ae8841e8d04da29e99..d4c0c9bb8eb9d52f8b29e84a80ccca3e33fca81f 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Problem peer state class
  *
index 375cf7bf43331eca1ad30f02f53619518e5e40c1..d9f0b12184233745f409d0b92704e2db384e688d 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A TransportEndpointGone peer state class
  *
index 2a149072537692ae9256709bce5b297f4ce43dd8..da101a97652468b7f2cd8dd43eff0368d7c8d71b 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * A Init peer state class
  *
index e49731f7326de6b0c737e741b42048815d950995..0121b919c4ad61bf613f62b54899cf7a16cf24d0 100644 (file)
@@ -6,6 +6,7 @@ namespace Hub\Crawler;
 use CoreFramework\Controller\Controller;
 use CoreFramework\Generic\FrameworkInterface;
 use CoreFramework\Response\Responseable;
+use CoreFramework\State\Stateable;
 
 /**
  * An interface for crawler classes
index 4e4a2ce366036b0657e2a32970177a4677f552b9..4ec3c6ad2ba3a7e71d6f71fb3f338d5dfd363e67 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Executor;
 
 // Import framework stuff
 use CoreFramework\Generic\FrameworkInterface;
+use CoreFramework\State\Stateable;
 
 /**
  * A Executor interface
index a80a7b9622183a734b3f0f819b2dffdce2c81cca..f04ad797f377eb8dc5f568d94142a47e1e594e65 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer\Lookup;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for peer-state lookup table wrappers
  *
index c5117328437cef098edcde1850093ed5b6f7c933..7da1e7f34d0224751f779d15146602c2b6389eca 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Producer\Block;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for the producer/consumer implementation, especially for block
  * producers.
index c36d4a44f5096f82d42c456d0cb06c1c9f6ca5c3..616e0c7624d4c8ca2e65f0b60fe863bd98532e01 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Producer\Key;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for the producer/consumer implementation, especially for key
  * producers.
index 409482861df386da327ed471aa0ac4fc2d5c95f1..d521c81c0d551227901876267250bd48c01f34b9 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Producer\Unit;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for the producer/consumer implementation, especially for work/
  * test unit producers.
diff --git a/application/hub/interfaces/states/class_ b/application/hub/interfaces/states/class_
deleted file mode 100644 (file)
index 1c52be1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * An interface for ??? states
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface ???Stateable extends Stateable {
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/states/class_Stateable.php b/application/hub/interfaces/states/class_Stateable.php
deleted file mode 100644 (file)
index 3488c16..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-// Own namespace
-namespace Hub\State;
-
-// Import framework stuff
-use CoreFramework\Generic\FrameworkInterface;
-
-/**
- * An interface for general states
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface Stateable extends FrameworkInterface {
-       /**
-        * Executes the state with given Executor instance
-        *
-        * @param       $executorInstance       An instance of a Executor class
-        * @return      void
-        */
-       function executeState (Executor $executorInstance);
-}
-
-// [EOF]
-?>
index cb802286e171cbf10a68a96d83f087c2bb37cc22..79f027370334cf80ae118ad8b59841c0252ad4c0 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Client;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for client states
  *
index 9b8b1b9da0da1caabcd71a8715d45a237fcf12df..aaf8f3b838c6ff726f6be31ed3118f56fc9708be 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for hub states
  *
index 39dc13f50f60888f258b5cca92315628c0b1a034..e1de0cb0fcd51cde034c571f204180a824561b70 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\State\Peer;
+
+// Import framework stuff
+use CoreFramework\State\Stateable;
+
 /**
  * An interface for Peer states
  *