Example #1
0
 public function getServerAddress($serverId = null)
 {
     if ($serverId == null) {
         if (strtolower($this->dbInterface_type) === 'ice') {
             $matches;
             preg_match('/-h ([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})/', $this->dbInterface_address, $matches);
             return isset($matches[1]) ? $matches[1] : null;
         }
     } else {
         if (isset($this->serverAddresses[$serverId])) {
             return $this->serverAddresses[$serverId];
         }
         MessageManager::addMessage('Trying to get serveraddress for a serverIp which does not have an associated server address in the settings file.');
     }
     return null;
 }