From: Roland Häder Date: Fri, 19 May 2017 14:25:49 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0c0b4940fe008d8037a67149d350e4599c2eae93;p=hub.git Continued: - imported Stateable - renamed templates to closer name - deleted duplicate (now in core framework) interface/template - created namespaces Signed-off-by: Roland Häder --- diff --git a/application/hub/classes/communicator/class_BaseCommunicator.php b/application/hub/classes/communicator/class_BaseCommunicator.php index a16daf3df..6eec1dbd7 100644 --- a/application/hub/classes/communicator/class_BaseCommunicator.php +++ b/application/hub/classes/communicator/class_BaseCommunicator.php @@ -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 * diff --git a/application/hub/classes/crawler/class_BaseNodeCrawler.php b/application/hub/classes/crawler/class_BaseNodeCrawler.php index 590a222af..ec1e88529 100644 --- a/application/hub/classes/crawler/class_BaseNodeCrawler.php +++ b/application/hub/classes/crawler/class_BaseNodeCrawler.php @@ -7,6 +7,7 @@ use Hub\Generic\BaseHubSystem; // Import framework stuff use CoreFramework\Registry\Registry; +use CoreFramework\State\Stateable; /** * A general NodeCrawler class diff --git a/application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php b/application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php index 3078d680f..83980750e 100644 --- a/application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php +++ b/application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php @@ -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 diff --git a/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php b/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php index 59d2bc3a0..21dd2f1f5 100644 --- a/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php +++ b/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php @@ -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 diff --git a/application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php b/application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php index 6006a215a..97b7f8e5c 100644 --- a/application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php +++ b/application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php @@ -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 diff --git a/application/hub/classes/states/communicator/active/class_CommunicatorActiveState.php b/application/hub/classes/states/communicator/active/class_CommunicatorActiveState.php index 64267457d..00d5e4088 100644 --- a/application/hub/classes/states/communicator/active/class_CommunicatorActiveState.php +++ b/application/hub/classes/states/communicator/active/class_CommunicatorActiveState.php @@ -1,4 +1,10 @@ - * @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 . - */ -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 index 000000000..a159a1ab3 --- /dev/null +++ b/application/hub/classes/states/communicator/class_Communicator @@ -0,0 +1,66 @@ + + * @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 . + */ +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/init/class_CommunicatorInitState.php b/application/hub/classes/states/communicator/init/class_CommunicatorInitState.php index 30d3a628d..d3f166e4b 100644 --- a/application/hub/classes/states/communicator/init/class_CommunicatorInitState.php +++ b/application/hub/classes/states/communicator/init/class_CommunicatorInitState.php @@ -1,4 +1,10 @@ - * @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 . - */ -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 index 000000000..e1924dd1e --- /dev/null +++ b/application/hub/classes/states/crawler/class_Crawler @@ -0,0 +1,66 @@ + + * @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 . + */ +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/init/class_CrawlerInitState.php b/application/hub/classes/states/crawler/init/class_CrawlerInitState.php index fffd219ed..6c7cdd07d 100644 --- a/application/hub/classes/states/crawler/init/class_CrawlerInitState.php +++ b/application/hub/classes/states/crawler/init/class_CrawlerInitState.php @@ -1,4 +1,10 @@ - * @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 . - */ -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 index 000000000..1182d6ae2 --- /dev/null +++ b/application/hub/classes/states/cruncher/class_Cruncher @@ -0,0 +1,76 @@ + + * @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 . + */ +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/init/class_CruncherInitState.php b/application/hub/classes/states/cruncher/init/class_CruncherInitState.php index 8c1938590..22d0ca66c 100644 --- a/application/hub/classes/states/cruncher/init/class_CruncherInitState.php +++ b/application/hub/classes/states/cruncher/init/class_CruncherInitState.php @@ -1,4 +1,10 @@ - * @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 . - */ -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 index 000000000..d885f71ce --- /dev/null +++ b/application/hub/classes/states/dht/class_Dht @@ -0,0 +1,66 @@ + + * @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 . + */ +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/init/class_DhtInitState.php b/application/hub/classes/states/dht/init/class_DhtInitState.php index 4a6ac153b..d0d7c9770 100644 --- a/application/hub/classes/states/dht/init/class_DhtInitState.php +++ b/application/hub/classes/states/dht/init/class_DhtInitState.php @@ -1,4 +1,10 @@ - * @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 . - */ -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] -?> diff --git a/application/hub/classes/states/node/class_BaseNodeState.php b/application/hub/classes/states/node/class_BaseNodeState.php index 171331df8..ee2342764 100644 --- a/application/hub/classes/states/node/class_BaseNodeState.php +++ b/application/hub/classes/states/node/class_BaseNodeState.php @@ -1,4 +1,10 @@ + * @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 . + */ +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] +?> diff --git a/application/hub/classes/states/node/init/class_NodeInitState.php b/application/hub/classes/states/node/init/class_NodeInitState.php index b5c9b439a..6e2097981 100644 --- a/application/hub/classes/states/node/init/class_NodeInitState.php +++ b/application/hub/classes/states/node/init/class_NodeInitState.php @@ -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 * diff --git a/application/hub/classes/states/node/seniors/class_NodeReachableState.php b/application/hub/classes/states/node/seniors/class_NodeReachableState.php index 2f311140d..92716831a 100644 --- a/application/hub/classes/states/node/seniors/class_NodeReachableState.php +++ b/application/hub/classes/states/node/seniors/class_NodeReachableState.php @@ -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 * diff --git a/application/hub/classes/states/node/virgin/class_NodeVirginState.php b/application/hub/classes/states/node/virgin/class_NodeVirginState.php index 68c3ce622..c9ce7e423 100644 --- a/application/hub/classes/states/node/virgin/class_NodeVirginState.php +++ b/application/hub/classes/states/node/virgin/class_NodeVirginState.php @@ -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 * diff --git a/application/hub/classes/states/peer/class_ b/application/hub/classes/states/peer/class_ index 850482bc8..52b4de7de 100644 --- a/application/hub/classes/states/peer/class_ +++ b/application/hub/classes/states/peer/class_ @@ -1,4 +1,10 @@ - * @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 . - */ -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 index 3488c16d6..000000000 --- a/application/hub/interfaces/states/class_Stateable.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @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 . - */ -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] -?> diff --git a/application/hub/interfaces/states/client/class_ClientStateable.php b/application/hub/interfaces/states/client/class_ClientStateable.php index cb802286e..79f027370 100644 --- a/application/hub/interfaces/states/client/class_ClientStateable.php +++ b/application/hub/interfaces/states/client/class_ClientStateable.php @@ -1,4 +1,10 @@