/**
* Method to "bootstrap" the apt-proxy. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the apt-proxy. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the chatter. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the chatter. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the crawler. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the crawler. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
namespace Hub\Cruncher;
// Import framework stuff
-use CoreFramework\Request\Requestable;
+use CoreFramework\Registry\Registerable;
/**
* A hub-cruncher class for the '???' mode
/**
* Creates an instance of this hub-cruncher class
*
- * @param $requestInstance An instance of a Requestable class
- * @return $cruncherInstance An instance of this hub-cruncher class
+ * @return $cruncherInstance An instance of this hub-cruncher class
*/
- public final static function createHub???Cruncher (Requestable $requestInstance) {
+ public final static function createHub???Cruncher () {
// Get a new instance
$cruncherInstance = new Hub???Cruncher();
- // Set the request instance
- $cruncherInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $cruncherInstance;
}
use Hub\Node\BaseHubNode;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Criteria\Local\LocalSearchCriteria;
use CoreFramework\Criteria\Storing\StoreableCriteria;
use CoreFramework\Database\Frontend\BaseDatabaseWrapper;
// Get node/request instances
$nodeInstance = NodeObjectFactory::createNodeInstance();
- $requestInstance = ApplicationHelper::getSelfInstance()->getRequestInstance();
+ $requestInstance = FrameworkBootstrap::getRequestInstance();
// Get a dataset instance
$dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_DHT));
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Criteria\Local\LocalSearchCriteria;
use CoreFramework\Database\Frontend\BaseDatabaseWrapper;
use CoreFramework\Factory\ObjectFactory;
// Search for the node number one which is hard-coded the default
$searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR , 1);
- $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, $nodeInstance->getRequestInstance()->getRequestElement('mode'));
+ $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, FrameworkBootstrap::getRequestInstance()->getRequestElement('mode'));
$searchInstance->setLimit(1);
// Get a result back
);
// Get the node instance
- $nodeInstance = ObjectFactory::createObjectByName($className, array($requestInstance));
+ $nodeInstance = ObjectFactory::createObjectByName($className);
// Get a registry
$applicationInstance = Registry::getRegistry()->getInstance('app');
// Return the instance
return $nodeInstance;
}
-}
-// [EOF]
-?>
+}
namespace Hub\Miner;
// Import framework stuff
-use CoreFramework\Request\Requestable;
+use CoreFramework\Registry\Registerable;
/**
* A hub-miner class for the '???' mode
/**
* Creates an instance of this hub-miner class
*
- * @param $requestInstance An instance of a Requestable class
- * @return $minerInstance An instance of this hub-miner class
+ * @return $minerInstance An instance of this hub-miner class
*/
- public final static function createHub???Miner (Requestable $requestInstance) {
+ public final static function createHub???Miner () {
// Get a new instance
$minerInstance = new Hub???Miner();
- // Set the request instance
- $minerInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $minerInstance;
}
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Handler\Task\HandleableTask;
use CoreFramework\Registry\Registry;
use CoreFramework\Registry\Registerable;
-use CoreFramework\Request\Requestable;
/**
* A hub-node class for the 'Boot' mode
* @param $requestInstance An instance of a Requestable class
* @return $nodeInstance An instance of this hub-node class
*/
- public static final function createHubBootNode (Requestable $requestInstance) {
+ public static final function createHubBootNode () {
// Get a new instance
$nodeInstance = new HubBootNode();
- // Set the request instance
- $nodeInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $nodeInstance;
}
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: UNL matches bootstrap node ' . $this->getBootUniversalNodeLocator() . '.');
// Now, does the mode match
- if ($this->getRequestInstance()->getRequestElement('mode') == self::NODE_TYPE_BOOT) {
+ if (FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') == self::NODE_TYPE_BOOT) {
// Output debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Our node is a valid bootstrap node.');
} else {
// Output warning
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: WARNING: Mismatching mode ' . $this->getRequestInstance()->getRequestElement('mode') . '!=' . BaseHubNode::NODE_TYPE_BOOT . ' detected.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: WARNING: Mismatching mode ' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') . '!=' . BaseHubNode::NODE_TYPE_BOOT . ' detected.');
}
} else {
// IP does match, but no port
use Hub\Helper\Node\NodeHelper;
// Import framework stuff
-use CoreFramework\Request\Requestable;
+use CoreFramework\Registry\Registerable;
/**
* A hub-node class for the '???' mode
/**
* Creates an instance of this hub-node class
*
- * @param $requestInstance An instance of a Requestable class
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of this hub-node class
*/
- public final static function createHub???Node (Requestable $requestInstance) {
+ public final static function createHub???Node () {
// Get a new instance
$nodeInstance = new Hub???Node();
- // Set the request instance
- $nodeInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $nodeInstance;
}
use Hub\Tools\HubTools;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Criteria\Add\AddableCriteria;
use CoreFramework\Criteria\Local\LocalSearchCriteria;
use CoreFramework\Criteria\Storing\StoreableCriteria;
$this->setPrivateKeyHash($this->getCryptoInstance()->hashString($this->getPrivateKey()));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerPrivateKey($this, $this->getRequestInstance(), $searchInstance);
+ $this->getWrapperInstance()->registerPrivateKey($this, FrameworkBootstrap::getRequestInstance(), $searchInstance);
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new private key with hash: ' . $this->getPrivateKeyHash() . '');
$rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
// Generate a pseudo-random string
- $randomString = $rngInstance->randomString($length) . ':' . $this->getBootUniversalNodeLocator() . ':' . $this->getRequestInstance()->getRequestElement('mode');
+ $randomString = $rngInstance->randomString($length) . ':' . $this->getBootUniversalNodeLocator() . ':' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode');
// Add UUID for even more entropy for the hasher
$randomString .= $this->getCryptoInstance()->createUuid();
// Output all lines
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') . ' mode active');
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2015 Hub Developer Team');
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' ');
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
$this->setNodeId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerNodeId($this, $this->getRequestInstance());
+ $this->getWrapperInstance()->registerNodeId($this, FrameworkBootstrap::getRequestInstance());
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new node-id: ' . $this->getNodeId() . '');
// Search for the node number one which is hard-coded the default
$searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR , 1);
- $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, $this->getRequestInstance()->getRequestElement('mode'));
+ $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, FrameworkBootstrap::getRequestInstance()->getRequestElement('mode'));
$searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID , $this->getNodeId());
$searchInstance->setLimit(1);
$this->setSessionId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerSessionId($this, $this->getRequestInstance(), $searchInstance);
+ $this->getWrapperInstance()->registerSessionId($this, FrameworkBootstrap::getRequestInstance(), $searchInstance);
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new session-id: ' . $this->getSessionId() . '');
* HubRegularNode is faster, but if e.g. HubRegularI2PNode will be
* added then the next check will be TRUE.
*/
- $acceptsRequest = ((!$this instanceof HubRegularNode) && ($this->getRequestInstance()->getRequestElement('mode') != self::NODE_TYPE_REGULAR));
+ $acceptsRequest = ((!$this instanceof HubRegularNode) && (FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') != self::NODE_TYPE_REGULAR));
// Return it
return $acceptsRequest;
use CoreFramework\Handler\Task\HandleableTask;
use CoreFramework\Registry\Registry;
use CoreFramework\Registry\Registerable;
-use CoreFramework\Request\Requestable;
/**
* A hub-node class for the 'List' mode
* @param $requestInstance An instance of a Requestable class
* @return $nodeInstance An instance of this hub-node class
*/
- public static final function createHubListNode (Requestable $requestInstance) {
+ public static final function createHubListNode () {
// Get a new instance
$nodeInstance = new HubListNode();
- // Set the request instance
- $nodeInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $nodeInstance;
}
use CoreFramework\Handler\Task\HandleableTask;
use CoreFramework\Registry\Registry;
use CoreFramework\Registry\Registerable;
-use CoreFramework\Request\Requestable;
/**
* A hub-node class for the 'Master' mode
/**
* Creates an instance of this hub-node class
*
- * @param $requestInstance An instance of a Requestable class
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of this hub-node class
*/
- public static final function createHubMasterNode (Requestable $requestInstance) {
+ public static final function createHubMasterNode () {
// Get a new instance
$nodeInstance = new HubMasterNode();
- // Set the request instance
- $nodeInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $nodeInstance;
}
use CoreFramework\Handler\Task\HandleableTask;
use CoreFramework\Registry\Registry;
use CoreFramework\Registry\Registerable;
-use CoreFramework\Request\Requestable;
/**
* A hub-node class for the 'regular' mode
* @param $requestInstance An instance of a Requestable class
* @return $nodeInstance An instance of this hub-node class
*/
- public static final function createHubRegularNode (Requestable $requestInstance) {
+ public static final function createHubRegularNode () {
// Get a new instance
$nodeInstance = new HubRegularNode();
- // Set the request instance
- $nodeInstance->setRequestInstance($requestInstance);
-
// Return the instance
return $nodeInstance;
}
namespace Hub\TemplateEngine\Xml;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Registry\Registry;
$applicationInstance = Registry::getRegistry()->getInstance('app');
// Determine base path
- $templateBasePath = $this->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $this->getConfigInstance()->getConfigEntry('application_base_path') . FrameworkBootstrap::getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
/**
* Method to "bootstrap" the apt-proxy. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the chatter. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the crawler. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the cruncher. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the node. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
/**
* Method to "bootstrap" the miner. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
-Subproject commit 49fe7de1c03a4424e4f62a70c8ab1eae2593faf0
+Subproject commit de0fb4d6e2785338f2ba881761efc7b15c4a9530