* @return $unl Universal node locator
*/
public function resolveUniversalNodeLocatorFromConfigKey ($configKey) {
+ // Get address
+ $address = $this->getConfigInstance()->getConfigEntry($configKey . '_address');
+
+ // Is the address empty?
+ if (empty($address)) {
+ // Okay, then find it
+ switch ($configKey) {
+ case 'external': // External IP
+ $address = ConsoleTools::determineExternalAddress();
+ break;
+
+ case 'internal': // Internal IP
+ $address = ConsoleTools::acquireSelfIPAddress();
+ break;
+ } // END - switch
+ } // END - if
+
// Put all together
$unl = sprintf('%s://%s:%s',
$this->getProtocolName(),
- $this->getConfigInstance()->getConfigEntry($configKey . '_address'),
+ $address,
$this->getConfigInstance()->getConfigEntry('node_listen_port')
);