LdapTools\Object\LdapObjectManager::executeBatchOperation PHP Method

executeBatchOperation() protected method

protected executeBatchOperation ( LdapObject $ldapObject, string | null $dn = null )
$ldapObject LdapObject
$dn string | null The DN to use for the batch operation to LDAP.
    protected function executeBatchOperation(LdapObject $ldapObject, $dn = null)
    {
        $dn = $dn ?: $ldapObject->get('dn');
        $operation = new BatchModifyOperation($dn, $ldapObject->getBatchCollection());
        $this->hydrateOperation($operation, $ldapObject->getType());
        $this->connection->execute($operation);
        $ldapObject->setBatchCollection(new BatchCollection($ldapObject->get('dn')));
    }