From 4396b4e074adb9087be26ab605f17c41915a5163 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Mar 2011 15:04:00 +0000 Subject: [PATCH] Some methods renamed --- .../hub/interfaces/cruncher/class_CruncherHelper.php | 2 +- application/hub/interfaces/nodes/class_NodeHelper.php | 6 +++--- .../commands/console/class_HubConsoleCruncherCommand.php | 6 ++++++ .../main/commands/console/class_HubConsoleMainCommand.php | 4 ++-- .../hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php | 6 +++--- application/hub/main/nodes/boot/class_HubBootNode.php | 2 +- application/hub/main/nodes/class_BaseHubNode.php | 2 +- application/hub/main/nodes/list/class_HubListNode.php | 2 +- application/hub/main/nodes/master/class_HubMasterNode.php | 2 +- application/hub/main/nodes/regular/class_HubRegularNode.php | 2 +- 10 files changed, 20 insertions(+), 14 deletions(-) diff --git a/application/hub/interfaces/cruncher/class_CruncherHelper.php b/application/hub/interfaces/cruncher/class_CruncherHelper.php index e95431a29..3aaf7bb43 100644 --- a/application/hub/interfaces/cruncher/class_CruncherHelper.php +++ b/application/hub/interfaces/cruncher/class_CruncherHelper.php @@ -45,7 +45,7 @@ interface CruncherHelper extends FrameworkInterface { * * @return void */ - function addExtraHubFilters (); + function addExtraCruncherFilters (); } // [EOF] diff --git a/application/hub/interfaces/nodes/class_NodeHelper.php b/application/hub/interfaces/nodes/class_NodeHelper.php index c90d2c918..6480248ae 100644 --- a/application/hub/interfaces/nodes/class_NodeHelper.php +++ b/application/hub/interfaces/nodes/class_NodeHelper.php @@ -52,7 +52,7 @@ interface NodeHelper extends FrameworkInterface { * * @return void */ - function addExtraHubFilters (); + function addExtraNodeFilters (); /** * Generic method to acquire a hub-id. On first run this generates a new one @@ -73,7 +73,7 @@ interface NodeHelper extends FrameworkInterface { * @param $responseInstance A Responseable class * @return void */ - function activateHub (Requestable $requestInstance, Responseable $responseInstance); + function activateNode (Requestable $requestInstance, Responseable $responseInstance); /** * Generates a session id which will be sent to the other hubs and peers @@ -101,7 +101,7 @@ interface NodeHelper extends FrameworkInterface { * * @return void */ - function addExtraHubFilters (); + function addExtraNodeFilters (); /** * Announces this hub to the upper (bootstrap or list) hubs. After this is diff --git a/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php index 6c7d779c8..71679c920 100644 --- a/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php @@ -69,6 +69,12 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable { $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance); $this->debugOutput('BOOTSTRAP: Bootstrap finished.'); + // Get cruncher instance + $cruncherInstance = Registry::getRegistry()->getInstance('cruncher'); + + // Add some cruncher-specific filters, e.g. announcement + $cruncherInstance->addExtraCruncherFilters(); + // Get task handler instance $handlerInstance = Registry::getRegistry()->getInstance('task'); diff --git a/application/hub/main/commands/console/class_HubConsoleMainCommand.php b/application/hub/main/commands/console/class_HubConsoleMainCommand.php index cb0e46358..85a82af78 100644 --- a/application/hub/main/commands/console/class_HubConsoleMainCommand.php +++ b/application/hub/main/commands/console/class_HubConsoleMainCommand.php @@ -73,12 +73,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable { $nodeInstance = Registry::getRegistry()->getInstance('node'); // Add some node-specific filters, e.g. announcement - $nodeInstance->addExtraHubFilters(); + $nodeInstance->addExtraNodeFilters(); // -------------------------- Hub activation -------------------------- // Activates the hub by doing some final preparation steps and setting // the attribute $hubIsActive to true - $nodeInstance->activateHub($requestInstance, $responseInstance); + $nodeInstance->activateNode($requestInstance, $responseInstance); // Get task handler instance $handlerInstance = Registry::getRegistry()->getInstance('task'); diff --git a/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php b/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php index 2ccebd716..c0f7ac8eb 100644 --- a/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php +++ b/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php @@ -1,6 +1,6 @@ * @version 0.0.0 @@ -36,7 +36,7 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis * 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 createHubMcryptCruncher (Requestable $requestInstance) { // Get a new instance @@ -78,7 +78,7 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis * * @return void */ - public function addExtraHubFilters () { + public function addExtraCruncherFilters () { // Add some filters here } } diff --git a/application/hub/main/nodes/boot/class_HubBootNode.php b/application/hub/main/nodes/boot/class_HubBootNode.php index 54e03aa74..ee6faf454 100644 --- a/application/hub/main/nodes/boot/class_HubBootNode.php +++ b/application/hub/main/nodes/boot/class_HubBootNode.php @@ -109,7 +109,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable { * * @return void */ - public function addExtraHubFilters () { + public function addExtraNodeFilters () { // Get the application instance from registry $applicationInstance = Registry::getRegistry()->getInstance('app'); diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index c46b4a5c6..086e1da59 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -548,7 +548,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { * @param $responseInstance A Responseable class * @return void */ - public function activateHub (Requestable $requestInstance, Responseable $responseInstance) { + public function activateNode (Requestable $requestInstance, Responseable $responseInstance) { // Checks wether a listener is still active and shuts it down if one // is still listening. if (($this->determineIfListenerIsActive()) && ($this->getIsActive())) { diff --git a/application/hub/main/nodes/list/class_HubListNode.php b/application/hub/main/nodes/list/class_HubListNode.php index 26782ed73..572d7f954 100644 --- a/application/hub/main/nodes/list/class_HubListNode.php +++ b/application/hub/main/nodes/list/class_HubListNode.php @@ -78,7 +78,7 @@ class HubListNode extends BaseHubNode implements NodeHelper, Registerable { * * @return void */ - public function addExtraHubFilters () { + public function addExtraNodeFilters () { // Get the application instance from registry $applicationInstance = Registry::getRegistry()->getInstance('app'); diff --git a/application/hub/main/nodes/master/class_HubMasterNode.php b/application/hub/main/nodes/master/class_HubMasterNode.php index 392c15f10..4cca8217b 100644 --- a/application/hub/main/nodes/master/class_HubMasterNode.php +++ b/application/hub/main/nodes/master/class_HubMasterNode.php @@ -78,7 +78,7 @@ class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable { * * @return void */ - public function addExtraHubFilters () { + public function addExtraNodeFilters () { // Get the application instance from registry $applicationInstance = Registry::getRegistry()->getInstance('app'); diff --git a/application/hub/main/nodes/regular/class_HubRegularNode.php b/application/hub/main/nodes/regular/class_HubRegularNode.php index 201e250cf..e6db87565 100644 --- a/application/hub/main/nodes/regular/class_HubRegularNode.php +++ b/application/hub/main/nodes/regular/class_HubRegularNode.php @@ -78,7 +78,7 @@ class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable { * * @return void */ - public function addExtraHubFilters () { + public function addExtraNodeFilters () { // Get the application instance from registry $applicationInstance = Registry::getRegistry()->getInstance('app'); -- 2.39.5