*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 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.shipsimu.org
*
// Set it here
$this->setCryptoInstance($cryptoInstance);
+ // Set the node instance in registry
+ Registry::getRegistry()->addInstance('node', $this);
+
// Init state which sets the state to 'init'
$this->initState();
}
*/
private function initState() {
// Get the state factory and create the initial state.
- NodeStateFactory::createNodeStateInstanceByName('init', $this);
+ NodeStateFactory::createNodeStateInstanceByName('init');
}
/**
// Output all lines
self::createDebugInstance(__CLASS__)->debugOutput(' ');
self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
- self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team');
+ self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2015 Hub Developer Team');
self::createDebugInstance(__CLASS__)->debugOutput(' ');
self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
// Output message
self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Created new session-id: ' . $this->getSessionId() . '');
- // Change the state because the node has auired a hub id
+ // Change the state because the node has aquired a session id
$this->getStateInstance()->nodeGeneratedSessionId();
}
$unlInstance = $this->determineUniversalNodeLocator();
// Make sure the instance is valid
- // * DEBUG: */ $this->debugInstance('unlInstance[]=' . gettype($unlInstance));
- assert($unlInstance instanceof LocateableNode);
+ if (!$unlInstance instanceof LocateableNode) {
+ // No valid instance, so better debug this
+ $this->debugBackTrace('unlInstance[' . gettype($unlInstance) . ']=' . $unlInstance);
+ } // END - if
// ... and the array from it
$unlData = $unlInstance->getUnlData();