public function move(Entry $entry, string $newParent)
    {
        $con = $this->getConnectionResource();
        $rdn = $this->parseRdnFromEntry($entry);
        // deleteOldRdn does not matter here, since the Rdn will not be changing in the move.
        if (!@ldap_rename($con, $entry->getDn(), $rdn, $newParent, true)) {
            throw new LdapException(sprintf('Could not move entry "%s" to "%s": %s.', $entry->getDn(), $newParent, ldap_error($con)));
        }
    }
public function move(Entry $entry, string $newParent)
    {
        $con = $this->getConnectionResource();
        $rdn = $this->parseRdnFromEntry($entry);
        // deleteOldRdn does not matter here, since the Rdn will not be changing in the move.
        if (!@ldap_rename($con, $entry->getDn(), $rdn, $newParent, true)) {
            throw new LdapException(sprintf('Could not move entry "%s" to "%s": %s.', $entry->getDn(), $newParent, ldap_error($con)));
        }
    }
public function move ( Entry $ entry , string $ newParent ) { $ con = $ this -> getConnectionResource ( ) ; $ rdn = $ this -> parseRdnFromEntry ( $ entry ) ; // deleteOldRdn does not matter here, since the Rdn will not be changing in the move. if ( ! @ ldap_rename ( $ con , $ entry -> getDn ( ) , $ rdn , $ newParent , true ) ) { throw new LdapException ( sprintf ( 'Could not move entry "%s" to "%s": %s.' , $ entry -> getDn ( ) , $ newParent , ldap_error ( $ con ) ) ) ; } }
Moves an entry on the Ldap server.

@throws NotBoundException if the connection has not been previously bound
@throws LdapException     if an error is thrown during the rename operation
Moves an entry on the Ldap server .