File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ array, you may use the
103
103
104
104
// Do something with the results array
105
105
106
+ By default, LDAP queries use the ``Symfony\Component\Ldap\Adapter::SCOPE_SUB ``
107
+ scope, which corresponds to the ``LDAP_SCOPE_SUBTREE `` scope of the
108
+ :phpfunction: `ldap_search ` function. You can also use ``SCOPE_BASE `` (related
109
+ to the ``LDAP_SCOPE_BASE `` scope of :phpfunction: `ldap_read `) and ``SCOPE_ONE ``
110
+ (related to the ``LDAP_SCOPE_ONELEVEL `` scope of :phpfunction: `ldap_list `)::
111
+
112
+ use Symfony\Component\Ldap\Adapter;
113
+
114
+ $query = $ldap->query('dc=symfony,dc=com', '...', ['scope' => Adapter::SCOPE_ONE]);
115
+
106
116
Creating or Updating Entries
107
117
----------------------------
108
118
Original file line number Diff line number Diff line change @@ -169,11 +169,13 @@ not need to be used.
169
169
repositoryMethod
170
170
~~~~~~~~~~~~~~~~
171
171
172
- **type **: ``string `` **default **: ``findBy() ``
172
+ **type **: ``string `` **default **: ``findBy ``
173
173
174
- The name of the repository method to use for making the query to determine
175
- the uniqueness. If it's left blank, the ``findBy() `` method will be used.
176
- This method should return a countable result.
174
+ The name of the repository method used to determine the uniqueness. If it's left
175
+ blank, ``findBy() `` will be used. The method receives as its argument a
176
+ ``fieldName => value `` associative array (where ``fieldName `` is each of the
177
+ fields configured in the ``fields `` option). The method should return a
178
+ `countable PHP variable `_.
177
179
178
180
entityClass
179
181
~~~~~~~~~~~
@@ -297,3 +299,4 @@ also has a ``null`` value, validation would fail.
297
299
.. include :: /reference/constraints/_payload-option.rst.inc
298
300
299
301
.. _`race conditions` : https://en.wikipedia.org/wiki/Race_condition
302
+ .. _`countable PHP variable` : https://php.net/manual/function.is-countable.php
You can’t perform that action at this time.
0 commit comments