]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/states/node/virgin/class_NodeVirginState.php
State pattern added, hub continued (sorry, I let it lay around uncommitted for long...
[hub.git] / application / hub / main / states / node / virgin / class_NodeVirginState.php
index aeb122358db4f52d67575639eadf2f768a759836..65a3fc6ad1bed347e14227d6aabb16b8fc54f820 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A Virgin node state class
+ * A virgin node state class
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
@@ -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 NodeVirginState extends BaseState implements NodeStateable {
+class NodeVirginState extends BaseNodeState implements Stateable {
        /**
         * Protected constructor
         *
@@ -39,14 +39,14 @@ class NodeVirginState 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 createNodeVirginState (NodeHelper $nodeInstance) {
                // Get new instance
                $stateInstance = new NodeVirginState();
 
                // Debug message
-               $stateInstance->debugOutput("NODE-STATE: Has changed from " . $nodeInstance->getPrintableState() . " to " . $stateInstance->getStateName() . ".");
+               $stateInstance->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
 
                // Set the node instance
                $stateInstance->setNodeInstance($nodeInstance);
@@ -56,7 +56,7 @@ class NodeVirginState extends BaseState implements NodeStateable {
        }
 
        /**
-        * Change the state to 'activate' when the hub has initialized all
+        * Change the state to 'active' when the hub has initialized all
         * listeners, tasks, queues, etc. An active hub does not imply that it
         * can be reached from outside so we have to deal with that state with
         * yet another state class.
@@ -65,7 +65,7 @@ class NodeVirginState extends BaseState implements NodeStateable {
         */
        public function nodeIsActivated () {
                // Create the new state instance
-               NodeStateFactory::createNodeStateInstanceByName('active', $this->getNodeInstance());
+               StateFactory::createStateInstanceByName('active', $this->getNodeInstance());
        }
 
 }