reference/ldap/functions/ldap-set-option.xml
a8a81b5185dcdd0722c356b573349b907aba9609
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>ldap_set_option</methodname>
13
-
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
13
+
<methodparam><type class="union"><type>LDAP\Connection</type><type>null</type></type><parameter>ldap</parameter></methodparam>
14
14
<methodparam><type>int</type><parameter>option</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter>newval</parameter></methodparam>
15
+
<methodparam><type class="union"><type>array</type><type>string</type><type>int</type><type>bool</type></type><parameter>value</parameter></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
-
Sets the value of the specified option to be <parameter>newval</parameter>.
18
+
Sets the value of the specified option to be <parameter>value</parameter>.
19
19
</para>
20
20
</refsect1>
21
21

...
...
@@ -24,10 +24,12 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>link_identifier</parameter></term>
27
+
<term><parameter>ldap</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
An LDAP link identifier, returned by <function>ldap_connect</function>.
30
+
Either an <classname>LDAP\Connection</classname> instance, returned by
31
+
<function>ldap_connect</function>, to set the option for that connection,
32
+
or &null; to set the option globally.
31
33
</para>
32
34
</listitem>
33
35
</varlistentry>
...
...
@@ -48,142 +50,142 @@
48
50
<tbody>
49
51
<row>
50
52
<entry><constant>LDAP_OPT_DEREF</constant></entry>
51
-
<entry>integer</entry>
52
-
<entry></entry>
53
+
<entry><type>int</type></entry>
54
+
<entry/>
53
55
</row>
54
56
<row>
55
57
<entry><constant>LDAP_OPT_SIZELIMIT</constant></entry>
56
-
<entry>integer</entry>
57
-
<entry></entry>
58
+
<entry><type>int</type></entry>
59
+
<entry/>
58
60
</row>
59
61
<row>
60
62
<entry><constant>LDAP_OPT_TIMELIMIT</constant></entry>
61
-
<entry>integer</entry>
62
-
<entry></entry>
63
+
<entry><type>int</type></entry>
64
+
<entry/>
63
65
</row>
64
66
<row>
65
67
<entry><constant>LDAP_OPT_NETWORK_TIMEOUT</constant></entry>
66
-
<entry>integer</entry>
67
-
<entry>PHP 5.3.0</entry>
68
+
<entry><type>int</type></entry>
69
+
<entry/>
68
70
</row>
69
71
<row>
70
72
<entry><constant>LDAP_OPT_PROTOCOL_VERSION</constant></entry>
71
-
<entry>integer</entry>
72
-
<entry></entry>
73
+
<entry><type>int</type></entry>
74
+
<entry/>
73
75
</row>
74
76
<row>
75
77
<entry><constant>LDAP_OPT_ERROR_NUMBER</constant></entry>
76
-
<entry>integer</entry>
77
-
<entry></entry>
78
+
<entry><type>int</type></entry>
79
+
<entry/>
78
80
</row>
79
81
<row>
80
82
<entry><constant>LDAP_OPT_REFERRALS</constant></entry>
81
-
<entry>bool</entry>
82
-
<entry></entry>
83
+
<entry><type>bool</type></entry>
84
+
<entry/>
83
85
</row>
84
86
<row>
85
87
<entry><constant>LDAP_OPT_RESTART</constant></entry>
86
-
<entry>bool</entry>
87
-
<entry></entry>
88
+
<entry><type>bool</type></entry>
89
+
<entry/>
88
90
</row>
89
91
<row>
90
92
<entry><constant>LDAP_OPT_HOST_NAME</constant></entry>
91
-
<entry>string</entry>
92
-
<entry></entry>
93
+
<entry><type>string</type></entry>
94
+
<entry/>
93
95
</row>
94
96
<row>
95
97
<entry><constant>LDAP_OPT_ERROR_STRING</constant></entry>
96
-
<entry>string</entry>
97
-
<entry></entry>
98
+
<entry><type>string</type></entry>
99
+
<entry/>
98
100
</row>
99
101
<row>
100
102
<entry><constant>LDAP_OPT_DIAGNOSTIC_MESSAGE</constant></entry>
101
-
<entry>string</entry>
102
-
<entry></entry>
103
+
<entry><type>string</type></entry>
104
+
<entry/>
103
105
</row>
104
106
<row>
105
107
<entry><constant>LDAP_OPT_MATCHED_DN</constant></entry>
106
-
<entry>string</entry>
107
-
<entry></entry>
108
+
<entry><type>string</type></entry>
109
+
<entry/>
108
110
</row>
109
111
<row>
110
112
<entry><constant>LDAP_OPT_SERVER_CONTROLS</constant></entry>
111
-
<entry>array</entry>
112
-
<entry></entry>
113
+
<entry><type>array</type></entry>
114
+
<entry/>
113
115
</row>
114
116
<row>
115
117
<entry><constant>LDAP_OPT_CLIENT_CONTROLS</constant></entry>
116
-
<entry>array</entry>
117
-
<entry></entry>
118
+
<entry><type>array</type></entry>
119
+
<entry/>
118
120
</row>
119
121
<row>
120
122
<entry><constant>LDAP_OPT_X_KEEPALIVE_IDLE</constant></entry>
121
-
<entry>int</entry>
123
+
<entry><type>int</type></entry>
122
124
<entry>PHP 7.1.0</entry>
123
125
</row>
124
126
<row>
125
127
<entry><constant>LDAP_OPT_X_KEEPALIVE_PROBES</constant></entry>
126
-
<entry>int</entry>
128
+
<entry><type>int</type></entry>
127
129
<entry>PHP 7.1.0</entry>
128
130
</row>
129
131
<row>
130
132
<entry><constant>LDAP_OPT_X_KEEPALIVE_INTERVAL</constant></entry>
131
-
<entry>int</entry>
133
+
<entry><type>int</type></entry>
132
134
<entry>PHP 7.1.0</entry>
133
135
</row>
134
136
<row>
135
137
<entry><constant>LDAP_OPT_X_TLS_CACERTDIR</constant></entry>
136
-
<entry>string</entry>
138
+
<entry><type>string</type></entry>
137
139
<entry>PHP 7.1.0</entry>
138
140
</row>
139
141
<row>
140
142
<entry><constant>LDAP_OPT_X_TLS_CACERTFILE</constant></entry>
141
-
<entry>string</entry>
143
+
<entry><type>string</type></entry>
142
144
<entry>PHP 7.1.0</entry>
143
145
</row>
144
146
<row>
145
147
<entry><constant>LDAP_OPT_X_TLS_CERTFILE</constant></entry>
146
-
<entry>string</entry>
148
+
<entry><type>string</type></entry>
147
149
<entry>PHP 7.1.0</entry>
148
150
</row>
149
151
<row>
150
152
<entry><constant>LDAP_OPT_X_TLS_CIPHER_SUITE</constant></entry>
151
-
<entry>string</entry>
153
+
<entry><type>string</type></entry>
152
154
<entry>PHP 7.1.0</entry>
153
155
</row>
154
156
<row>
155
157
<entry><constant>LDAP_OPT_X_TLS_CRLCHECK</constant></entry>
156
-
<entry>integer</entry>
158
+
<entry><type>int</type></entry>
157
159
<entry>PHP 7.1.0</entry>
158
160
</row>
159
161
<row>
160
162
<entry><constant>LDAP_OPT_X_TLS_CRLFILE</constant></entry>
161
-
<entry>string</entry>
163
+
<entry><type>string</type></entry>
162
164
<entry>PHP 7.1.0</entry>
163
165
</row>
164
166
<row>
165
167
<entry><constant>LDAP_OPT_X_TLS_DHFILE</constant></entry>
166
-
<entry>string</entry>
168
+
<entry><type>string</type></entry>
167
169
<entry>PHP 7.1.0</entry>
168
170
</row>
169
171
<row>
170
172
<entry><constant>LDAP_OPT_X_TLS_KEYFILE</constant></entry>
171
-
<entry>string</entry>
173
+
<entry><type>string</type></entry>
172
174
<entry>PHP 7.1.0</entry>
173
175
</row>
174
176
<row>
175
177
<entry><constant>LDAP_OPT_X_TLS_PROTOCOL_MIN</constant></entry>
176
-
<entry>integer</entry>
178
+
<entry><type>int</type></entry>
177
179
<entry>PHP 7.1.0</entry>
178
180
</row>
179
181
<row>
180
182
<entry><constant>LDAP_OPT_X_TLS_RANDOM_FILE</constant></entry>
181
-
<entry>string</entry>
183
+
<entry><type>string</type></entry>
182
184
<entry>PHP 7.1.0</entry>
183
185
</row>
184
186
<row>
185
187
<entry><constant>LDAP_OPT_X_TLS_REQUIRE_CERT</constant></entry>
186
-
<entry>integer</entry>
188
+
<entry><type>int</type></entry>
187
189
<entry>PHP 7.0.5</entry>
188
190
</row>
189
191
</tbody>
...
...
@@ -209,7 +211,7 @@
209
211
</listitem>
210
212
</varlistentry>
211
213
<varlistentry>
212
-
<term><parameter>newval</parameter></term>
214
+
<term><parameter>value</parameter></term>
213
215
<listitem>
214
216
<para>
215
217
The new value for the specified <parameter>option</parameter>.
...
...
@@ -227,6 +229,23 @@
227
229
</para>
228
230
</refsect1>
229
231

232
+
<refsect1 role="changelog">
233
+
&reftitle.changelog;
234
+
<informaltable>
235
+
<tgroup cols="2">
236
+
<thead>
237
+
<row>
238
+
<entry>&Version;</entry>
239
+
<entry>&Description;</entry>
240
+
</row>
241
+
</thead>
242
+
<tbody>
243
+
&ldap.changelog.ldap-object;
244
+
</tbody>
245
+
</tgroup>
246
+
</informaltable>
247
+
</refsect1>
248
+

230
249
<refsect1 role="examples">
231
250
&reftitle.examples;
232
251
<para>
...
...
@@ -235,7 +254,7 @@
235
254
<programlisting role="php">
236
255
<![CDATA[
237
256
<?php
238
-
// $ds is a valid link identifier for a directory server
257
+
// $ds is a valid LDAP\Connection instance for a directory server
239
258
if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
240
259
echo "Using LDAPv3";
241
260
} else {
...
...
@@ -250,7 +269,7 @@ if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
250
269
<programlisting role="php">
251
270
<![CDATA[
252
271
<?php
253
-
// $ds is a valid link identifier for a directory server
272
+
// $ds is a valid LDAP\Connection instance for a directory server
254
273
// control with no value
255
274
$ctrl1 = array("oid" => "1.2.752.58.10.1", "iscritical" => true);
256
275
// iscritical defaults to FALSE
...
...
@@ -286,7 +305,6 @@ if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) {
286
305
</refsect1>
287
306

288
307
</refentry>
289
-

290
308
<!-- Keep this comment at the end of the file
291
309
Local variables:
292
310
mode: sgml
293
311