*/
private $universalNodeLocatorData = array();
- /**
- * Name of used protocol
- */
- private $protocolName = 'invalid';
-
/**
* Protected constructor
*
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
*
/**
* 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();
$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));