]> git.mxchange.org Git - hub.git/commitdiff
'virigin' is now the correct state at this point
authorRoland Häder <roland@mxchange.org>
Thu, 21 Feb 2013 23:49:27 +0000 (23:49 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Feb 2013 23:49:27 +0000 (23:49 +0000)
application/hub/main/helper/dht/class_DhtBootstrapHelper.php
application/hub/main/states/dht/class_BaseDhtState.php

index d3d797b4f712b8fe39f39a0b38ec565021f7e57b..ee3afc770f0e79535fffa4cd54f8f68464cca455 100644 (file)
@@ -81,8 +81,8 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
         * @return      void
         */
        public function sendPackage (Distributable $dhtInstance) {
-               // Sanity check: Is the dht in the approx. state? (init)
-               $dhtInstance->getStateInstance()->validateDhtStateIsInitialized();
+               // Sanity check: Is the dht in the approx. state? (virgin)
+               $dhtInstance->getStateInstance()->validateDhtStateIsVirgin();
 
                // Compile the template, this inserts the loaded dht data into the gaps.
                $this->getTemplateInstance()->compileTemplate();
index 8a1223acfa1eda16bea775ca0063f6a4c8382488..a78f9dc161cc425ef0f639ca07cce656452c1883 100644 (file)
@@ -34,15 +34,15 @@ class BaseDhtState extends BaseState {
        }
 
        /**
-        * Validates whether the DHT state is 'init' or throws an exception if it
+        * Validates whether the DHT state is 'virgin' or throws an exception if it
         * is every other state.
         *
         * @return      void
-        * @throws      InvalidStateException   If the state is not 'active'
+        * @throws      InvalidStateException   If the state is not 'virgin'
         */
-       public function validateDhtStateIsInitialized () {
+       public function validateDhtStateIsVirgin () {
                // Just compare it...
-               if (!$this instanceof DhtInitState) {
+               if (!$this instanceof DhtVirginState) {
                        // Throw the exception
                        throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
                } // END - if