*
* @return void
*/
- private function outputConsoleTeaser () {
+ protected function outputConsoleTeaser () {
// Get the app instance (for shortening our code)
$app = $this->getApplicationInstance();
* Do generic things for bootup phase. This can be e.g. checking if the
* right node mode is selected for this hub's IP number.
*
- * @todo This method is maybe not yet finished.
* @return void
+ * @todo This method is maybe not yet finished.
*/
protected function doGenericBootstrapping () {
- // Finally output our teaser. This should be the last line!
- $this->outputConsoleTeaser();
+ // @TODO Empty method
+ $this->partialStub('Add some generic bootstrap steps here.');
}
/**
* based on many pseudo-random data. On any later run, unless the id
* got not removed from database, it will be restored from the database.
*
- * @param $requestInstance An instance of a Requestable class
* @return void
*/
- public function acquireHubId (Requestable $requestInstance) {
+ protected function acquireHubId () {
// Get a wrapper instance
$wrapperInstance = ObjectFactory::createObjectByConfiguredName('node_info_db_wrapper_class');
// Search for the node number zero which is hard-coded the default
$searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR, 1);
- $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_TYPE, $requestInstance->getRequestElement('mode'));
+ $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_TYPE, $this->getRequestInstance()->getRequestElement('mode'));
$searchInstance->setLimit(1);
// Get a result back
$rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
// Generate a pseudo-random string
- $randomString = $rngInstance->randomString(255) . ':' . $requestInstance->getRequestElement('mode');
+ $randomString = $rngInstance->randomString(255) . ':' . $this->getRequestInstance()->getRequestElement('mode');
// Get a crypto instance
$cryptoInstance = ObjectFactory::createObjectByConfiguredName('crypto_class');
$this->setNodeId($cryptoInstance->hashString($cryptoInstance->encryptString($randomString)));
// Register the node id with our wrapper
- $wrapperInstance->registerNodeId($this, $requestInstance);
+ $wrapperInstance->registerNodeId($this, $this->getRequestInstance());
// Output message
$this->getDebugInstance()->output('Created new node-id: ' . $this->getNodeId() . '');