Skip to content

[PHP 8.4] DBA resource to Object conversions #3914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,16 @@ returned by <function>dbmopen</function>.</para></listitem></varlistentry>'>
</entry>
</row>'>

<!-- dba notes -->
<!ENTITY dba.parameter.dba 'A <classname xmlns="http://docbook.org/ns/docbook">Dba\Connection</classname> instance, returned by <function xmlns="http://docbook.org/ns/docbook">dba_open</function> or <function xmlns="http://docbook.org/ns/docbook">dba_popen</function>.'>
<!ENTITY dba.changelog.dba-object '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.4.0</entry>
<entry>
The <parameter>dba</parameter> parameter expects a <classname>Dba\Connection</classname>
instance now; previously, a valid <literal>dba</literal> &resource; was expected.
</entry>
</row>'>

<!-- dbase notes -->

<!ENTITY dbase.type-conversion '<para xmlns="http://docbook.org/ns/docbook">
Expand Down
53 changes: 53 additions & 0 deletions reference/dba/dba.connection.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<reference xml:id="class.dba-connection" role="class" xmlns="http://docbook.org/ns/docbook">
<title>The Dba\Connection class</title>
<titleabbrev>Dba\Connection</titleabbrev>

<partintro>

<!-- {{{ Dba\Connection intro -->
<section xml:id="dba-connection.intro">
&reftitle.intro;
<para>
A fully opaque class which replaces a <literal>dba</literal> resource as of PHP 8.4.0.
</para>
</section>
<!-- }}} -->

<section xml:id="dba-connection.synopsis">
&reftitle.classsynopsis;

<!-- {{{ Synopsis -->
<classsynopsis class="class">
<ooclass>
<modifier>final</modifier>
<classname>Dba\Connection</classname>
</ooclass>
</classsynopsis>
<!-- }}} -->

</section>

</partintro>

</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-close.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>dba_close</methodname>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_close</function> closes the established database and frees
Expand All @@ -24,8 +24,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -38,6 +37,26 @@
&return.void;
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-delete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<methodsynopsis>
<type>bool</type><methodname>dba_delete</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_delete</function> deletes the specified entry from the database.
Expand All @@ -32,8 +32,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -46,6 +45,26 @@
&return.success;
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-exists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<methodsynopsis>
<type>bool</type><methodname>dba_exists</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_exists</function> checks whether the specified
Expand All @@ -33,8 +33,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -47,6 +46,26 @@
Returns &true; if the key exists, &false; otherwise.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
6 changes: 3 additions & 3 deletions reference/dba/functions/dba-fetch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>dba_fetch</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>skip</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<simpara>
Expand Down Expand Up @@ -51,8 +51,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -89,6 +88,7 @@
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
<row>
<entry>8.3.0</entry>
<entry>
Expand Down
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-firstkey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>dba_firstkey</methodname>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_firstkey</function> returns the first key of the database
Expand All @@ -25,8 +25,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -39,6 +38,26 @@
Returns the key on success&return.falseforfailure;.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-insert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<type>bool</type><methodname>dba_insert</methodname>
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>key</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_insert</function> inserts the entry described with
Expand Down Expand Up @@ -45,8 +45,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -59,6 +58,26 @@
&return.success;
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
25 changes: 22 additions & 3 deletions reference/dba/functions/dba-nextkey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>dba_nextkey</methodname>
<methodparam><type>resource</type><parameter>dba</parameter></methodparam>
<methodparam><type>Dba\Connection</type><parameter>dba</parameter></methodparam>
</methodsynopsis>
<para>
<function>dba_nextkey</function> returns the next key of the database
Expand All @@ -24,8 +24,7 @@
<term><parameter>dba</parameter></term>
<listitem>
<para>
The database handler, returned by <function>dba_open</function> or
<function>dba_popen</function>.
&dba.parameter.dba;
</para>
</listitem>
</varlistentry>
Expand All @@ -38,6 +37,26 @@
Returns the key on success&return.falseforfailure;.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&dba.changelog.dba-object;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
Loading