public static function explodeDn($dn, $removeAttributePrefixes = true)
    {
        $dn = ldap_explode_dn($dn, ($removeAttributePrefixes ? 1 : 0));

        if (is_array($dn) && array_key_exists('count', $dn)) {
            foreach ($dn as $rdn => $value) {
                $dn[$rdn] = self::unescape($value);
            }
        }

        return $dn;
    }
public static function explodeDn($dn, $removeAttributePrefixes = true)
    {
        $dn = ldap_explode_dn($dn, ($removeAttributePrefixes ? 1 : 0));

        if (is_array($dn) && array_key_exists('count', $dn)) {
            foreach ($dn as $rdn => $value) {
                $dn[$rdn] = self::unescape($value);
            }
        }

        return $dn;
    }
public static function explodeDn ( $ dn , $ removeAttributePrefixes = true ) { $ dn = ldap_explode_dn ( $ dn , ( $ removeAttributePrefixes ? 1 : 0 ) ) ; if ( is_array ( $ dn ) && array_key_exists ( 'count' , $ dn ) ) { foreach ( $ dn as $ rdn => $ value ) { $ dn [ $ rdn ] = self :: unescape ( $ value ) ; } } return $ dn ; }
Converts a DN string into an array of RDNs.

This will also decode hex characters into their true
UTF-8 representation embedded inside the DN as well.

@param string $dn
@param bool   $removeAttributePrefixes

@return array|false
Converts a DN string into an array of RDNs .