From 4d8040d4b9921940c96ca82ca2f7050ce20ed161 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 20 Feb 2019 12:27:16 +0100 Subject: [PATCH] Mentioned the LDAP query scopes --- components/ldap.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/ldap.rst b/components/ldap.rst index c764438671e..51e849a0e99 100644 --- a/components/ldap.rst +++ b/components/ldap.rst @@ -103,6 +103,16 @@ array, you may use the // Do something with the results array +By default, LDAP queries use the ``Symfony\Component\Ldap\Adapter::SCOPE_SUB`` +scope, which corresponds to the ``LDAP_SCOPE_SUBTREE`` scope of the +:phpfunction:`ldap_search` function. You can also use ``SCOPE_BASE`` (related +to the ``LDAP_SCOPE_BASE`` scope of :phpfunction:`ldap_read`) and ``SCOPE_ONE`` +(related to the ``LDAP_SCOPE_ONELEVEL`` scope of :phpfunction:`ldap_list`):: + + use Symfony\Component\Ldap\Adapter; + + $query = $ldap->query('dc=symfony,dc=com', '...', ['scope' => Adapter::SCOPE_ONE]); + Creating or Updating Entries ----------------------------