Skip to content

Commit d5f9822

Browse files
authored
dba_fetch() signature has changed to follow userland semantics (#1939)
The overloaded signature is still supported but discouraged.
1 parent db06b98 commit d5f9822

File tree

1 file changed

+44
-16
lines changed

1 file changed

+44
-16
lines changed

reference/dba/functions/dba-fetch.xml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@
77
</refnamediv>
88
<refsect1 role="description">
99
&reftitle.description;
10+
<methodsynopsis>
11+
<type class="union"><type>string</type><type>false</type></type><methodname>dba_fetch</methodname>
12+
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
13+
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
14+
<methodparam choice="opt"><type>int</type><parameter>skip</parameter><initializer>0</initializer></methodparam>
15+
</methodsynopsis>
16+
<simpara>
17+
Discouraged overloaded signature:
18+
</simpara>
1019
<methodsynopsis>
1120
<type>string</type><methodname>dba_fetch</methodname>
1221
<methodparam><type>string</type><parameter>key</parameter></methodparam>
13-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
22+
<methodparam><type>int</type><parameter>skip</parameter></methodparam>
23+
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
1424
</methodsynopsis>
15-
<methodsynopsis>
16-
<type>string</type><methodname>dba_fetch</methodname>
17-
<methodparam><type>string</type><parameter>key</parameter></methodparam>
18-
<methodparam><type>int</type><parameter>skip</parameter></methodparam>
19-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
20-
</methodsynopsis>
2125
<para>
2226
<function>dba_fetch</function> fetches the data specified by
2327
<parameter>key</parameter> from the database specified with
24-
<parameter>handle</parameter>.
28+
<parameter>dba</parameter>.
2529
</para>
2630
</refsect1>
2731
<refsect1 role="parameters">
@@ -44,27 +48,28 @@
4448
</listitem>
4549
</varlistentry>
4650
<varlistentry>
47-
<term><parameter>skip</parameter></term>
51+
<term><parameter>dba</parameter></term>
4852
<listitem>
4953
<para>
50-
The number of key-value pairs to ignore when using cdb databases.
51-
This value is ignored for all other databases which do not support
52-
multiple keys with the same name.
54+
The database handler, returned by <function>dba_open</function> or
55+
<function>dba_popen</function>.
5356
</para>
5457
</listitem>
5558
</varlistentry>
5659
<varlistentry>
57-
<term><parameter>handle</parameter></term>
60+
<term><parameter>skip</parameter></term>
5861
<listitem>
5962
<para>
60-
The database handler, returned by <function>dba_open</function> or
61-
<function>dba_popen</function>.
63+
The number of key-value pairs to ignore when using cdb databases.
64+
This value is ignored for all other databases which do not support
65+
multiple keys with the same name.
6266
</para>
6367
</listitem>
6468
</varlistentry>
6569
</variablelist>
6670
</para>
6771
</refsect1>
72+
6873
<refsect1 role="returnvalues">
6974
&reftitle.returnvalues;
7075
<para>
@@ -73,6 +78,30 @@
7378
</para>
7479
</refsect1>
7580

81+
<refsect1 role="changelog">
82+
&reftitle.changelog;
83+
<informaltable>
84+
<tgroup cols="2">
85+
<thead>
86+
<row>
87+
<entry>&Version;</entry>
88+
<entry>&Description;</entry>
89+
</row>
90+
</thead>
91+
<tbody>
92+
<row>
93+
<entry>8.2.0</entry>
94+
<entry>
95+
<function>dba_fetch</function>'s optional skip argument is now at the end
96+
in line with PHP userland semantics. The previously overloaded signature
97+
is still accepted but discouraged.
98+
</entry>
99+
</row>
100+
</tbody>
101+
</tgroup>
102+
</informaltable>
103+
</refsect1>
104+
76105
<refsect1 role="seealso">
77106
&reftitle.seealso;
78107
<para>
@@ -86,7 +115,6 @@
86115
</para>
87116
</refsect1>
88117
</refentry>
89-
90118
<!-- Keep this comment at the end of the file
91119
Local variables:
92120
mode: sgml

0 commit comments

Comments
 (0)