]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/states/node/init/class_NodeInitState.php
Updated 'core'.
[hub.git] / application / hub / main / states / node / init / class_NodeInitState.php
index 4d64f2e8aeb145b2d886abe3db3e8d5e425cb1dd..6f4014f17a421d3b91de0dc14625a54778731b74 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 /**
- * A Init node state class
+ * A init node state class
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team
+ * @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
+ * @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
@@ -21,7 +21,7 @@
  * 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 NodeInitState extends BaseState implements NodeStateable {
+class NodeInitState extends BaseNodeState implements Stateable {
        /**
         * Protected constructor
         *
@@ -38,19 +38,12 @@ class NodeInitState extends BaseState implements NodeStateable {
        /**
         * Creates an instance of this class
         *
-        * @param       $nodeInstance   An instance of a NodeHelper class
-        * @return      $stateInstance  An instance of a NodeStateable class
+        * @return      $stateInstance  An instance of a Stateable class
         */
-       public final static function createNodeInitState (NodeHelper $nodeInstance) {
+       public static final function createNodeInitState () {
                // Get new instance
                $stateInstance = new NodeInitState();
 
-               // Debug message
-               $stateInstance->debugOutput("NODE-STATE: Has changed from " . $nodeInstance->getPrintableState() . " to " . $stateInstance->getStateName() . ".");
-
-               // Set the node instance
-               $stateInstance->setNodeInstance($nodeInstance);
-
                // Return the prepared instance
                return $stateInstance;
        }
@@ -58,12 +51,14 @@ class NodeInitState extends BaseState implements NodeStateable {
        /**
         * State change for if the node has just generated a session id. This makes
         * nodes with current state 'init' now 'virgin'.
+        *
+        * @return      void
+        * @todo        We might want to move some calls to this method to fill it with life
         */
        public function nodeGeneratedSessionId () {
                // Create the new state instance
-               NodeStateFactory::createNodeStateInstanceByName('virgin', $this->getNodeInstance());
+               NodeStateFactory::createNodeStateInstanceByName('virgin');
        }
-
 }
 
 // [EOF]