reference/ldap/functions/ldap-connect.xml
57c38af2b053068ad0f1dfdead8128b957ccf4f0
...
...
@@ -9,22 +9,21 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type class="union"><type>resource</type><type>false</type></type><methodname>ldap_connect</methodname>
12
+
<type class="union"><type>LDAP\Connection</type><type>false</type></type><methodname>ldap_connect</methodname>
13
13
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>uri</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<warning>
16
16
<simpara>
17
-
The <emphasis>following</emphasis> signature is still supported for backwards
18
-
compatibility (except for using named parameters), but is considered deprecated and should not be used anymore!
17
+
As of PHP 8.3.0, the <emphasis>following</emphasis> signature is deprecated.
19
18
</simpara>
20
19
</warning>
21
20
<methodsynopsis>
22
-
<type class="union"><type>resource</type><type>false</type></type><methodname>ldap_connect</methodname>
23
-
<methodparam choice="opt"><type>string</type><parameter>host</parameter><initializer>&null;</initializer></methodparam>
21
+
<type class="union"><type>LDAP\Connection</type><type>false</type></type><methodname>ldap_connect</methodname>
22
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>host</parameter><initializer>&null;</initializer></methodparam>
24
23
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>389</initializer></methodparam>
25
24
</methodsynopsis>
26
25
<para>
27
-
Creates an LDAP link identifier and checks whether the given
26
+
Creates an <classname>LDAP\Connection</classname> connection and checks whether the given
28
27
<parameter>uri</parameter> is plausible.
29
28
</para>
30
29
<note>
...
...
@@ -78,21 +77,52 @@
78
77
<refsect1 role="returnvalues">
79
78
&reftitle.returnvalues;
80
79
<para>
81
-
Returns a positive LDAP link identifier when the provided LDAP URI
80
+
Returns an <classname>LDAP\Connection</classname> instance when the provided LDAP URI
82
81
seems plausible. It's a syntactic check of the provided parameter but the server(s) will not
83
82
be contacted! If the syntactic check fails it returns &false;.
84
83
<function>ldap_connect</function> will otherwise
85
-
return a <type>resource</type> as it does not actually connect but just
84
+
return a <classname>LDAP\Connection</classname> instance as it does not actually connect but just
86
85
initializes the connecting parameters. The actual connect happens with
87
-
the next calls to ldap_* funcs, usually with
86
+
the next calls to ldap_* functions, usually with
88
87
<function>ldap_bind</function>.
89
88
</para>
90
89
<para>
91
-
If no argument is specified then the link identifier of the already
92
-
opened link will be returned.
90
+
If no argument is specified then the <classname>LDAP\Connection</classname> instance of the already
91
+
opened connection will be returned.
93
92
</para>
94
93
</refsect1>
95
94

95
+
<refsect1 role="changelog">
96
+
&reftitle.changelog;
97
+
<informaltable>
98
+
<tgroup cols="2">
99
+
<thead>
100
+
<row>
101
+
<entry>&Version;</entry>
102
+
<entry>&Description;</entry>
103
+
</row>
104
+
</thead>
105
+
<tbody>
106
+
<row>
107
+
<entry>8.3.0</entry>
108
+
<entry>
109
+
Calling <function>ldap_connect</function> with separate
110
+
<parameter>hostname</parameter> and <parameter>port</parameter>
111
+
is now deprecated.
112
+
</entry>
113
+
</row>
114
+
<row>
115
+
<entry>8.1.0</entry>
116
+
<entry>
117
+
Returns an <classname>LDAP\Connection</classname> instance now;
118
+
previously, a &resource; was returned.
119
+
</entry>
120
+
</row>
121
+
</tbody>
122
+
</tgroup>
123
+
</informaltable>
124
+
</refsect1>
125
+

96
126
<refsect1 role="examples">
97
127
&reftitle.examples;
98
128
<para>
99
129