Generate sysvmsn methodsynopses based on stubs

Based on a patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351509 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2020-11-22 23:22:27 +00:00
parent 105769eb55
commit f7e33278a9
6 changed files with 205 additions and 57 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-get-queue">
<refentry xml:id="function.msg-get-queue" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_get_queue</refname>
<refpurpose>Create or attach to a message queue</refpurpose>
@ -9,15 +9,15 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>msg_get_queue</methodname>
<type class="union"><type>SysvMessageQueue</type><type>false</type></type><methodname>msg_get_queue</methodname>
<methodparam><type>int</type><parameter>key</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>perms</parameter><initializer>0666</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>permissions</parameter><initializer>0666</initializer></methodparam>
</methodsynopsis>
<para>
<function>msg_get_queue</function> returns an id that can be used to
access the System V message queue with the given
<parameter>key</parameter>. The first call creates the message queue with
the optional <parameter>perms</parameter>.
the optional <parameter>permissions</parameter>.
A second call to <function>msg_get_queue</function> for the same
<parameter>key</parameter> will return a different message queue
identifier, but both identifiers access the same underlying message
@ -38,11 +38,11 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>perms</parameter></term>
<term><parameter>permissions</parameter></term>
<listitem>
<para>
Queue permissions. Default to 0666. If the message queue already
exists, the <parameter>perms</parameter> will be ignored.
exists, the <parameter>permissions</parameter> will be ignored.
</para>
</listitem>
</varlistentry>
@ -53,10 +53,36 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a resource handle that can be used to access the System V message queue.
Returns <classname>SysvMessageQueue</classname> instance that can be used to access the System V message queue,
&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>
<row>
<entry>8.0.0</entry>
<entry>
On success, this function returns a <classname>SysvMessageQueue</classname> instance now;
previously, a <type>resource</type> was returned.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -71,7 +97,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-receive">
<refentry xml:id="function.msg-receive" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_receive</refname>
<refpurpose>Receive a message from a message queue</refpurpose>
@ -10,19 +10,19 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>msg_receive</methodname>
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
<methodparam><type>int</type><parameter>desiredmsgtype</parameter></methodparam>
<methodparam><type>int</type><parameter role="reference">msgtype</parameter></methodparam>
<methodparam><type>int</type><parameter>maxsize</parameter></methodparam>
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
<methodparam><type>int</type><parameter>desired_message_type</parameter></methodparam>
<methodparam><type>int</type><parameter role="reference">received_message_type</parameter></methodparam>
<methodparam><type>int</type><parameter>max_message_size</parameter></methodparam>
<methodparam><type>mixed</type><parameter role="reference">message</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>unserialize</parameter><initializer>&true;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">errorcode</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>msg_receive</function> will receive the first message from the
specified <parameter>queue</parameter> of the type specified by
<parameter>desiredmsgtype</parameter>.
<parameter>desired_message_type</parameter>.
</para>
</refsect1>
@ -34,20 +34,20 @@
<term><parameter>queue</parameter></term>
<listitem>
<para>
Message queue resource handle
The message queue.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>desiredmsgtype</parameter></term>
<term><parameter>desired_message_type</parameter></term>
<listitem>
<para>
If <parameter>desiredmsgtype</parameter> is 0, the message from the front
of the queue is returned. If <parameter>desiredmsgtype</parameter> is
If <parameter>desired_message_type</parameter> is 0, the message from the front
of the queue is returned. If <parameter>desired_message_type</parameter> is
greater than 0, then the first message of that type is returned.
If <parameter>desiredmsgtype</parameter> is less than 0, the first
If <parameter>desired_message_type</parameter> is less than 0, the first
message on the queue with a type less than or equal to the
absolute value of <parameter>desiredmsgtype</parameter> will be read.
absolute value of <parameter>desired_message_type</parameter> will be read.
If no messages match the criteria, your script will wait until a suitable
message arrives on the queue. You can prevent the script from blocking
by specifying <constant>MSG_IPC_NOWAIT</constant> in the
@ -56,7 +56,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>msgtype</parameter></term>
<term><parameter>received_message_type</parameter></term>
<listitem>
<para>
The type of the message that was received will be stored in this
@ -65,11 +65,11 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>maxsize</parameter></term>
<term><parameter>max_message_size</parameter></term>
<listitem>
<para>
The maximum size of message to be accepted is specified by the
<parameter>maxsize</parameter>; if the message in the queue is larger
<parameter>max_message_size</parameter>; if the message in the queue is larger
than this size the function will fail (unless you set
<parameter>flags</parameter> as described below).
</para>
@ -115,7 +115,7 @@
<row>
<entry><constant>MSG_IPC_NOWAIT</constant></entry>
<entry>If there are no messages of the
<parameter>desiredmsgtype</parameter>, return immediately and do not
<parameter>desired_message_type</parameter>, return immediately and do not
wait. The function will fail and return an integer value
corresponding to <constant>MSG_ENOMSG</constant>.
</entry>
@ -123,16 +123,16 @@
<row>
<entry><constant>MSG_EXCEPT</constant></entry>
<entry>Using this flag in combination with a
<parameter>desiredmsgtype</parameter> greater than 0 will cause the
<parameter>desired_message_type</parameter> greater than 0 will cause the
function to receive the first message that is not equal to
<parameter>desiredmsgtype</parameter>.</entry>
<parameter>desired_message_type</parameter>.</entry>
</row>
<row>
<entry><constant>MSG_NOERROR</constant></entry>
<entry>
If the message is longer than <parameter>maxsize</parameter>,
If the message is longer than <parameter>max_message_size</parameter>,
setting this flag will truncate the message to
<parameter>maxsize</parameter> and will not signal an error.
<parameter>max_message_size</parameter> and will not signal an error.
</entry>
</row>
</tbody>
@ -142,10 +142,10 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>errorcode</parameter></term>
<term><parameter>error_code</parameter></term>
<listitem>
<para>
If the function fails, the optional <parameter>errorcode</parameter>
If the function fails, the optional <parameter>error_code</parameter>
will be set to the value of the system errno variable.
</para>
</listitem>
@ -167,6 +167,31 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -180,7 +205,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-remove-queue">
<refentry xml:id="function.msg-remove-queue" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_remove_queue</refname>
<refpurpose>Destroy a message queue</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>msg_remove_queue</methodname>
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
</methodsynopsis>
<para>
<function>msg_remove_queue</function> destroys the message queue specified
@ -28,7 +28,7 @@
<term><parameter>queue</parameter></term>
<listitem>
<para>
Message queue resource handle
The message queue.
</para>
</listitem>
</varlistentry>
@ -43,6 +43,31 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -56,7 +81,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-send">
<refentry xml:id="function.msg-send" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_send</refname>
<refpurpose>Send a message to a message queue</refpurpose>
@ -10,16 +10,16 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>msg_send</methodname>
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
<methodparam><type>int</type><parameter>msgtype</parameter></methodparam>
<methodparam><type>mixed</type><parameter>message</parameter></methodparam>
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
<methodparam><type>int</type><parameter>message_type</parameter></methodparam>
<methodparam><type class="union"><type>string</type><type>int</type><type>float</type><type>bool</type></type><parameter>message</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>serialize</parameter><initializer>&true;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>blocking</parameter><initializer>&true;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">errorcode</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>msg_send</function> sends a <parameter>message</parameter> of type
<parameter>msgtype</parameter> (which MUST be greater than 0) to
<parameter>message_type</parameter> (which MUST be greater than 0) to
the message queue specified by <parameter>queue</parameter>.
</para>
</refsect1>
@ -32,12 +32,12 @@
<term><parameter>queue</parameter></term>
<listitem>
<para>
Message queue resource handle
The message queue.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>msgtype</parameter></term>
<term><parameter>message_type</parameter></term>
<listitem>
<para>
The type of the message (MUST be greater than 0)
@ -84,14 +84,14 @@
optional <parameter>blocking</parameter> parameter to &false;, in which
case <function>msg_send</function> will immediately return &false; if the
message is too big for the queue, and set the optional
<parameter>errorcode</parameter> to <constant>MSG_EAGAIN</constant>,
<parameter>error_code</parameter> to <constant>MSG_EAGAIN</constant>,
indicating that you should try to send your message again a little
later on.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>errorcode</parameter></term>
<term><parameter>error_code</parameter></term>
<listitem>
<para>
If the function fails, the optional errorcode will be set to the value of the system errno variable.
@ -115,6 +115,31 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -128,7 +153,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-set-queue">
<refentry xml:id="function.msg-set-queue" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_set_queue</refname>
<refpurpose>Set information in the message queue data structure</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>msg_set_queue</methodname>
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
<methodparam><type>array</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
@ -35,7 +35,7 @@
<term><parameter>queue</parameter></term>
<listitem>
<para>
Message queue resource handle
The message queue.
</para>
</listitem>
</varlistentry>
@ -59,6 +59,31 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -72,7 +97,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.msg-stat-queue">
<refentry xml:id="function.msg-stat-queue" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>msg_stat_queue</refname>
<refpurpose>Returns information from the message queue data structure</refpurpose>
@ -9,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>msg_stat_queue</methodname>
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
<type class="union"><type>array</type><type>false</type></type><methodname>msg_stat_queue</methodname>
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
</methodsynopsis>
<para>
<function>msg_stat_queue</function> returns the message queue meta data
@ -28,7 +28,7 @@
<term><parameter>queue</parameter></term>
<listitem>
<para>
Message queue resource handle
The message queue.
</para>
</listitem>
</varlistentry>
@ -39,7 +39,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The return value is an array whose keys and values have the following
On success, the return value is an array whose keys and values have the following
meanings:
<table>
<title>Array structure for msg_stat_queue</title>
@ -111,8 +111,36 @@
</tgroup>
</table>
</para>
<para>
Returns &false; on failure.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -126,7 +154,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml