]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/handler/protocol/class_BaseProtocolHandler.php
Updated 'core'.
[hub.git] / application / hub / main / handler / protocol / class_BaseProtocolHandler.php
index d769cde79c5fc77f4082a7a76cdfc01f17cb1b01..cf085db5720265655f5225733bd83357c5b6b378 100644 (file)
@@ -27,11 +27,6 @@ class BaseProtocolHandler extends BaseHandler {
         */
        private $universalNodeLocatorData = array();
 
-       /**
-        * Name of used protocol
-        */
-       private $protocolName = 'invalid';
-
        /**
         * Protected constructor
         *
@@ -43,25 +38,6 @@ class BaseProtocolHandler extends BaseHandler {
                parent::__construct($className);
        }
 
-       /**
-        * Getter for protocol name
-        *
-        * @return      $protocolName   Name of used protocol
-        */
-       public final function getProtocolName () {
-               return $this->protocolName;
-       }
-
-       /**
-        * Setter for protocol name
-        *
-        * @param       $protocolName   Name of used protocol
-        * @return      void
-        */
-       protected final function setProtocolName ($protocolName) {
-               $this->protocolName = $protocolName;
-       }
-
        /**
         * Setter for UNL data array to satify HandleableProtocol
         *
@@ -196,12 +172,10 @@ class BaseProtocolHandler extends BaseHandler {
        /**
         * If the found UNL (address) matches own external or internal address
         *
+        * @param       $unl            UNL to test
         * @return      $ifMatches      Whether the found UNL matches own addresss
         */
-       public function isOwnAddress () {
-               // Get current UNL (from universalNodeLocatorData array)
-               $currentUnl = $this->getCurrentUniversalNodeLocator();
-
+       public function isOwnAddress ($unl) {
                // Get own external UNL
                $externalUnl = HubTools::determineOwnExternalAddress();
 
@@ -209,11 +183,11 @@ class BaseProtocolHandler extends BaseHandler {
                $internalUnl = HubTools::determineOwnInternalAddress();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: currentUnl=' . $currentUnl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
-               //* DIE-DEBUG: */ die(__METHOD__.':currentUnl=' . $currentUnl . ',this='.print_r($this, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
+               //* DIE-DEBUG: */ die(__METHOD__.':unl=' . $unl . ',this='.print_r($this, TRUE));
 
                // Is it the same?
-               $ifMatches = (($currentUnl === $externalUnl) || ($currentUnl === $internalUnl));
+               $ifMatches = (($unl === $externalUnl) || ($unl === $internalUnl));
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches));