src/LdapTools/Utilities/LdapUtilities.php
public static function getParentDn($dn)
    {
        $parts = self::explodeDn($dn, 0);
        if (count($parts) === 1) {
            throw new InvalidArgumentException(sprintf('DN "%s" has no parent.', $dn));
        }
        array_shift($parts);
    
        return self::implodeDn($parts);
    }
public static function getParentDn($dn)
    {
        $parts = self::explodeDn($dn, 0);
        if (count($parts) === 1) {
            throw new InvalidArgumentException(sprintf('DN "%s" has no parent.', $dn));
        }
        array_shift($parts);
    
        return self::implodeDn($parts);
    }
public static function getParentDn ( $ dn ) { $ parts = self :: explodeDn ( $ dn , 0 ) ; if ( count ( $ parts ) === 1 ) { throw new InvalidArgumentException ( sprintf ( 'DN "%s" has no parent.' , $ dn ) ) ; } array_shift ( $ parts ) ; return self :: implodeDn ( $ parts ) ; }
Return the parent of a given DN.

@param string $dn
@return string
Return the parent of a given DN .