From: Roland Häder Date: Thu, 20 Dec 2012 22:59:35 +0000 (+0000) Subject: Use createDebugInstance() instead of direct debugOutput() method, removed DHT instanc... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b938bc9d0e4d528045e9fe0fb57e7c7ba92622a;p=hub.git Use createDebugInstance() instead of direct debugOutput() method, removed DHT instance as it will be moved to some other place (where it would make sense) --- diff --git a/application/hub/main/handler/message-types/class_BaseMessageHandler.php b/application/hub/main/handler/message-types/class_BaseMessageHandler.php index 5518e2e2c..2063fc48e 100644 --- a/application/hub/main/handler/message-types/class_BaseMessageHandler.php +++ b/application/hub/main/handler/message-types/class_BaseMessageHandler.php @@ -68,7 +68,7 @@ abstract class BaseMessageHandler extends BaseDataHandler { protected function registerNodeByMessageData (array $messageData) { // Check if searchData has entries assert(count($this->searchData) > 0); - $this->debugOutput('messageData=' . print_r($messageData, true)); + self::createDebugInstance(__CLASS__)->debugOutput('messageData=' . print_r($messageData, true)); // Get a wrapper instance $wrapperInstance = ObjectFactory::createObjectByConfiguredName('node_list_db_wrapper_class'); @@ -79,7 +79,7 @@ abstract class BaseMessageHandler extends BaseDataHandler { // Search for the node's session id and external IP/hostname + TCP port foreach ($this->searchData as $key) { // Debug message - //* DEBUG: */ $this->debugOutput('MESSAGE-HANDLER: messageData=' . print_r($messageData,true)); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER: messageData=' . print_r($messageData,true)); // Add criteria $searchInstance->addCriteria('node_' . str_replace('my-', '', $key), $messageData[$key]); diff --git a/application/hub/main/helper/hub/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php b/application/hub/main/helper/hub/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php index 81789e414..6926ed28f 100644 --- a/application/hub/main/helper/hub/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php +++ b/application/hub/main/helper/hub/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php @@ -81,9 +81,6 @@ class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper impleme // Is must not be NULL (then it can only be a template instance) assert(!is_null($entriesInstance)); - // Get DHT instance - $dhtInstance = DhtObjectFactory::createDhtObjectInstance($nodeInstance); - // Render the XML content $templateInstance->renderXmlContent(); } diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index abf8cccb5..866bc2ea0 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -176,7 +176,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable */ public function handlePendingData () { // Debug output - //* NOISY-DEBUG: */ $this->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); // Assert on condition assert(!$this->isPendingDataEmpty()); diff --git a/application/hub/main/streams/raw_data/input/class_RawDataInputStream.php b/application/hub/main/streams/raw_data/input/class_RawDataInputStream.php index 41a4d474a..44a1999d2 100644 --- a/application/hub/main/streams/raw_data/input/class_RawDataInputStream.php +++ b/application/hub/main/streams/raw_data/input/class_RawDataInputStream.php @@ -79,7 +79,7 @@ class RawDataInputStream extends BaseStream implements InputStreamable { } // Debug message - //* NOISY-DEBUG: */ $this->debugOutput('RAW-INPUT-STREAM: Length of data is now ' . strlen($data) . ' Bytes.'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RAW-INPUT-STREAM: Length of data is now ' . strlen($data) . ' Bytes.'); // Return it return $data;