diff --git a/components/ldap.rst b/components/ldap.rst index 743380d7179..4a0751c42e5 100644 --- a/components/ldap.rst +++ b/components/ldap.rst @@ -129,8 +129,16 @@ delete existing ones:: $entry = $result[0]; $entry->setAttribute('email', array('fabpot@symfony.com')); $entityManager->update($entry); + + // Adding or removing values to a multi-valued attribute is more efficient than using update() + $entityManager->addAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444')); + $entityManager->removeAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444')); // Removing an existing entry $entityManager->remove(new Entry('cn=Test User,dc=symfony,dc=com')); +.. versionadded:: 4.1 + The ``addAttributeValues()`` and ``removeAttributeValues()`` methods + were introduced in Symfony 4.1. + .. _Packagist: https://packagist.org/packages/symfony/ldap pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy