LdapTools\DomainConfiguration::getDomainName PHP Method

getDomainName() public method

Get the fully qualified domain name.
public getDomainName ( ) : string
return string
    public function getDomainName()
    {
        return $this->config['domainName'];
    }

Usage Example

コード例 #1
0
 /**
  * Attempt to lookup the LDAP servers from the DNS name.
  *
  * @return array The LDAP servers.
  * @throws LdapConnectionException
  */
 protected function getServersFromDns()
 {
     $servers = $this->dns->getRecord(LdapUtilities::SRV_PREFIX . $this->config->getDomainName(), DNS_SRV);
     if ($servers === false || empty($servers)) {
         throw new LdapConnectionException(sprintf('No LDAP servers found via DNS for "%s".', $this->config->getDomainName()));
     }
     array_multisort(array_column($servers, 'pri'), SORT_ASC | SORT_NUMERIC, array_column($servers, 'weight'), SORT_DESC | SORT_NUMERIC, $servers);
     return array_column($servers, 'target');
 }
All Usage Examples Of LdapTools\DomainConfiguration::getDomainName