From 065a7d9f3cd465047a0e3ad4c41236155ff8a9d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 15 Mar 2011 21:30:54 +0000 Subject: [PATCH] Some configuration entries prefixed with 'node_' --- application/hub/config.php | 54 +++++++++---------- application/hub/exceptions.php | 4 +- ...s_NodeActivationSelfAnnouncementFilter.php | 1 - ...class_NodeTaskHandlerInitializerFilter.php | 2 +- .../class_HubDescriptorHelper.php | 2 +- .../connection/class_HubSelfConnectHelper.php | 2 +- .../hub/main/nodes/class_BaseHubNode.php | 2 +- .../hub/main/package/class_NetworkPackage.php | 2 +- .../objects/class_ObjectTypeRegistry.php | 2 +- .../main/tags/package/class_PackageTags.php | 4 +- .../main/tasks/hub/ping/class_HubPingTask.php | 2 +- .../class_XmlAnnouncementTemplateEngine.php | 8 +-- .../class_XmlSelfConnectTemplateEngine.php | 8 +-- .../class_XmlObjectRegistryTemplateEngine.php | 10 ++-- 14 files changed, 52 insertions(+), 51 deletions(-) diff --git a/application/hub/config.php b/application/hub/config.php index 97c66392c..64c34f745 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -225,50 +225,50 @@ $cfg->setConfigEntry('cruncher_shutdown_cruncher_filter', 'CruncherShutdownCrunc // CFG: NEWS-READER-CLASS $cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader'); -// CFG: ANNOUNCEMENT-TEMPLATE-CLASS -$cfg->setConfigEntry('announcement_template_class', 'XmlAnnouncementTemplateEngine'); +// CFG: NODE-ANNOUNCEMENT-TEMPLATE-CLASS +$cfg->setConfigEntry('node_announcement_template_class', 'XmlAnnouncementTemplateEngine'); -// CFG: ANNOUNCEMENT-TEMPLATE-EXTENSION -$cfg->setConfigEntry('announcement_template_extension', '.xml'); +// CFG: NODE-ANNOUNCEMENT-TEMPLATE-EXTENSION +$cfg->setConfigEntry('node_announcement_template_extension', '.xml'); -// CFG: ANNOUNCEMENT-TEMPLATE-TYPE -$cfg->setConfigEntry('announcement_template_type', 'xml/announcement'); +// CFG: NODE-ANNOUNCEMENT-TEMPLATE-TYPE +$cfg->setConfigEntry('node_announcement_template_type', 'xml/announcement'); -// CFG: ANNOUNCEMENT-STACKER-CLASS -$cfg->setConfigEntry('announcement_stacker_class', 'FiLoStacker'); +// CFG: NODE-ANNOUNCEMENT-STACKER-CLASS +$cfg->setConfigEntry('node_announcement_stacker_class', 'FiLoStacker'); -// CFG: SELF-CONNECT-TEMPLATE-CLASS -$cfg->setConfigEntry('self_connect_template_class', 'XmlSelfConnectTemplateEngine'); +// CFG: NODE-SELF-CONNECT-TEMPLATE-CLASS +$cfg->setConfigEntry('node_self_connect_template_class', 'XmlSelfConnectTemplateEngine'); -// CFG: SELF-CONNECT-TEMPLATE-EXTENSION -$cfg->setConfigEntry('self_connect_template_extension', '.xml'); +// CFG: NODE-SELF-CONNECT-TEMPLATE-EXTENSION +$cfg->setConfigEntry('node_self_connect_template_extension', '.xml'); -// CFG: SELF-CONNECT-TEMPLATE-TYPE -$cfg->setConfigEntry('self_connect_template_type', 'xml/self_connect'); +// CFG: NODE-SELF-CONNECT-TEMPLATE-TYPE +$cfg->setConfigEntry('node_self_connect_template_type', 'xml/self_connect'); -// CFG: SELF-CONNECT-STACKER-CLASS -$cfg->setConfigEntry('self_connect_stacker_class', 'FiLoStacker'); +// CFG: NODE-SELF-CONNECT-STACKER-CLASS +$cfg->setConfigEntry('node_self_connect_stacker_class', 'FiLoStacker'); -// CFG: OBJECT-REGISTRY-TEMPLATE-CLASS -$cfg->setConfigEntry('object_registry_template_class', 'XmlObjectRegistryTemplateEngine'); +// CFG: NODE-OBJECT-REGISTRY-TEMPLATE-CLASS +$cfg->setConfigEntry('node_object_registry_template_class', 'XmlObjectRegistryTemplateEngine'); -// CFG: OBJECT-REGISTRY-TEMPLATE-EXTENSION -$cfg->setConfigEntry('object_registry_template_extension', '.xml'); +// CFG: NODE-OBJECT-REGISTRY-TEMPLATE-EXTENSION +$cfg->setConfigEntry('node_object_registry_template_extension', '.xml'); -// CFG: OBJECT-REGISTRY-TEMPLATE-TYPE -$cfg->setConfigEntry('object_registry_template_type', 'xml/object_registry'); +// CFG: NODE-OBJECT-REGISTRY-TEMPLATE-TYPE +$cfg->setConfigEntry('node_object_registry_template_type', 'xml/object_registry'); -// CFG: OBJECT-REGISTRY-STACKER-CLASS -$cfg->setConfigEntry('object_registry_stacker_class', 'FiLoStacker'); +// CFG: NODE-OBJECT-REGISTRY-STACKER-CLASS +$cfg->setConfigEntry('node_object_registry_stacker_class', 'FiLoStacker'); -// CFG: OBJECT-TYPE-REGISTRY-CLASS -$cfg->setConfigEntry('object_type_registry_class', 'ObjectTypeRegistry'); +// CFG: NODE-OBJECT-TYPE-REGISTRY-CLASS +$cfg->setConfigEntry('node_object_type_registry_class', 'ObjectTypeRegistry'); // CFG: CODE-TEMPLATE-TYPE $cfg->setConfigEntry('code_template_type', 'xml'); // CFG: PACKAGE-STACKER-CLASS -$cfg->setConfigEntry('package_stacker_class', 'FiFoStacker'); +$cfg->setConfigEntry('network_package_stacker_class', 'FiFoStacker'); // CFG: CRUNCHER-BUFFER-STACKER-CLASS $cfg->setConfigEntry('cruncher_buffer_stacker_class', 'FiFoStacker'); diff --git a/application/hub/exceptions.php b/application/hub/exceptions.php index 05a27767b..ca9ebde5e 100644 --- a/application/hub/exceptions.php +++ b/application/hub/exceptions.php @@ -111,7 +111,9 @@ function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) // Assertion handler function __assertHandler ($file, $line, $code) { // Empty code? - if ($code === '') $code = 'Unknown'; + if ($code === '') { + $code = 'Unknown'; + } // END - if // Create message $message = sprintf("File: %s, Line: %s, Code: %s", diff --git a/application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php b/application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php index a5e664c23..48ed5775f 100644 --- a/application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php +++ b/application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php @@ -51,7 +51,6 @@ class NodeActivationSelfAnnouncementFilter extends BaseFilter implements Filtera * @param $requestInstance An instance of a class with an Requestable interface * @param $responseInstance An instance of a class with an Responseable interface * @return void - * @todo 0% done */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get task handler instance diff --git a/application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php b/application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php index 1ae1a5af6..7e46b791d 100644 --- a/application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php +++ b/application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php @@ -52,7 +52,7 @@ class NodeTaskHandlerInitializerFilter extends BaseFilter implements Filterable * @param $responseInstance An instance of a class with an Responseable interface * @return void * @throws FilterChainException If we need to interrupt the filter chain - * @todo 0% done + * @todo Maybe some more tasks needs to be added? */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance diff --git a/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php b/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php index a3a62ee9c..6e912d0ef 100644 --- a/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php +++ b/application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php @@ -72,7 +72,7 @@ class HubDescriptorHelper extends BaseHubHelper implements HelpableHub { $applicationInstance = Registry::getRegistry()->getInstance('app'); // Get a XML template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('announcement_template_class', array($applicationInstance)); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class', array($applicationInstance)); // Disable language support $templateInstance->enableLanguageSupport(false); diff --git a/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php b/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php index 9f11626ad..9711cb002 100644 --- a/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php +++ b/application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php @@ -71,7 +71,7 @@ class HubSelfConnectHelper extends BaseHubHelper implements HelpableHub { $applicationInstance = Registry::getRegistry()->getInstance('app'); // Get a XML template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('self_connect_template_class', array($applicationInstance)); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class', array($applicationInstance)); // Disable language support $templateInstance->enableLanguageSupport(false); diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 58161f01a..f60f1fc79 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -263,7 +263,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable { break; } elseif ($ipPortArray[0] == $this->getConfigInstance()->getConfigEntry('node_listen_addr')) { // IP matches listen address. At this point we really don't care - // if we can also listen on that address! + // if we can really listen on that address $isFound = true; // Remember the port number diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index f05cb921a..c8479677a 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -115,7 +115,7 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Registe // We need to initialize a stack here for our packages even those // which have no recipient address and stamp... ;-) - $stackerInstance = ObjectFactory::createObjectByConfiguredName('package_stacker_class'); + $stackerInstance = ObjectFactory::createObjectByConfiguredName('network_package_stacker_class'); // At last, set it in this class $this->setStackerInstance($stackerInstance); diff --git a/application/hub/main/registry/objects/class_ObjectTypeRegistry.php b/application/hub/main/registry/objects/class_ObjectTypeRegistry.php index 4dd5b4df6..8e75ea519 100644 --- a/application/hub/main/registry/objects/class_ObjectTypeRegistry.php +++ b/application/hub/main/registry/objects/class_ObjectTypeRegistry.php @@ -60,7 +60,7 @@ class ObjectTypeRegistry extends BaseRegistry implements Register { */ public function getIterator () { // Prepare a default iterator - $iteratorInstance = ObjectFactory::createObjectByConfiguredName('object_type_iterator_class', array($this)); + $iteratorInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_iterator_class', array($this)); // And return it return $iteratorInstance; diff --git a/application/hub/main/tags/package/class_PackageTags.php b/application/hub/main/tags/package/class_PackageTags.php index f7aa8ff62..be54b5765 100644 --- a/application/hub/main/tags/package/class_PackageTags.php +++ b/application/hub/main/tags/package/class_PackageTags.php @@ -74,7 +74,7 @@ class PackageTags extends BaseTags implements Tagable { $applicationInstance = Registry::getRegistry()->getInstance('app'); // Get a XML template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('object_registry_template_class', array($applicationInstance)); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class', array($applicationInstance)); // Disable language support $templateInstance->enableLanguageSupport(false); @@ -126,7 +126,7 @@ class PackageTags extends BaseTags implements Tagable { */ private function verifyAllTags () { // Get the registry - $objectRegistryInstance = ObjectFactory::createObjectByConfiguredName('object_type_registry_class'); + $objectRegistryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class'); // "Walk" over all tags foreach ($this->getTags() as $tag) { diff --git a/application/hub/main/tasks/hub/ping/class_HubPingTask.php b/application/hub/main/tasks/hub/ping/class_HubPingTask.php index 1001d25b4..cda20d125 100644 --- a/application/hub/main/tasks/hub/ping/class_HubPingTask.php +++ b/application/hub/main/tasks/hub/ping/class_HubPingTask.php @@ -60,7 +60,6 @@ class HubPingTask extends BaseTask implements Visitable, Taskable { * * @param $visitorInstance An instance of a Visitor class * @return void - * @todo 0% */ public function accept (Visitor $visitorInstance) { // Visit this task @@ -71,6 +70,7 @@ class HubPingTask extends BaseTask implements Visitable, Taskable { * Executes the task * * @return void + * @todo 0% done */ public function executeTask () { $this->partialStub('Unimplemented task.'); diff --git a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php index d84ba681c..f4a066fd9 100644 --- a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php +++ b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php @@ -105,13 +105,13 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil // Set template extensions $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('announcement_template_extension')); + $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('node_announcement_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')); // Init a variable stacker - $stackerInstance = ObjectFactory::createObjectByConfiguredName('announcement_stacker_class'); + $stackerInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_stacker_class'); // Set it $templateInstance->setStackerInstance($stackerInstance); @@ -129,7 +129,7 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil */ public function loadAnnouncementTemplate ($template = 'self_announcement') { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('announcement_template_type')); + $this->setTemplateType($this->getConfigInstance()->getConfigEntry('node_announcement_template_type')); // Load the special template $this->loadTemplate($template); @@ -270,7 +270,7 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil // Is the template dependency set? if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) { // Get a temporay template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('announcement_template_class', array($this->getApplicationInstance())); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class', array($this->getApplicationInstance())); // Then load it $templateInstance->loadAnnouncementTemplate($templateDependency); diff --git a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php index 7ec553fe2..df6cdd09b 100644 --- a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php +++ b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php @@ -98,13 +98,13 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile // Set template extensions $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('self_connect_template_extension')); + $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('node_self_connect_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')); // Init a variable stacker - $stackerInstance = ObjectFactory::createObjectByConfiguredName('self_connect_stacker_class'); + $stackerInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_stacker_class'); // Set it $templateInstance->setStackerInstance($stackerInstance); @@ -122,7 +122,7 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile */ public function loadSelfConnectTemplate ($template = 'self_connect') { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('self_connect_template_type')); + $this->setTemplateType($this->getConfigInstance()->getConfigEntry('node_self_connect_template_type')); // Load the special template $this->loadTemplate($template); @@ -263,7 +263,7 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile // Is the template dependency set? if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) { // Get a temporay template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('self_connect_template_class', array($this->getApplicationInstance())); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class', array($this->getApplicationInstance())); // Then load it $templateInstance->loadSelfConnectTemplate($templateDependency); diff --git a/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php b/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php index a76a8827e..438565cd4 100644 --- a/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php +++ b/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php @@ -68,7 +68,7 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp parent::__construct(__CLASS__); // Init object type registry instance - $this->objectRegistryInstance = ObjectFactory::createObjectByConfiguredName('object_type_registry_class'); + $this->objectRegistryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class'); } /** @@ -110,13 +110,13 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp // Set template extensions $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('object_registry_template_extension')); + $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('node_object_registry_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')); // Init a variable stacker - $stackerInstance = ObjectFactory::createObjectByConfiguredName('object_registry_stacker_class'); + $stackerInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_stacker_class'); // Set it $templateInstance->setStackerInstance($stackerInstance); @@ -134,7 +134,7 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp */ public function loadObjectRegistryTemplate ($template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('object_registry_template_type')); + $this->setTemplateType($this->getConfigInstance()->getConfigEntry('node_object_registry_template_type')); // Load the special template $this->loadTemplate($template); @@ -282,7 +282,7 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp // Is the template dependency set? if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) { // Get a temporay template instance - $templateInstance = ObjectFactory::createObjectByConfiguredName('object_registry_template_class', array($this->getApplicationInstance())); + $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class', array($this->getApplicationInstance())); // Then load it $templateInstance->loadObjectRegistryTemplate($templateDependency); -- 2.39.5