public function setLdapType($ldapType)
    {
        if (!defined('\LdapTools\Connection\LdapConnection::TYPE_'.strtoupper($ldapType))) {
            throw new InvalidArgumentException(sprintf('Invalid LDAP type "%s".', $ldapType));
        }
        $this->config['ldapType'] = strtolower($ldapType);

        return $this;
    }