Skip to content

Generate a few ext/standard methods synopses from stubs - part 2 #1014

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 4 commits into from
Dec 23, 2021
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
13 changes: 6 additions & 7 deletions reference/stream/functions/stream-socket-get-name.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>stream_socket_get_name</methodname>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
<methodparam><type>bool</type><parameter>want_peer</parameter></methodparam>
<type class="union"><type>string</type><type>false</type></type><methodname>stream_socket_get_name</methodname>
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
<methodparam><type>bool</type><parameter>remote</parameter></methodparam>
</methodsynopsis>
<para>
Returns the local or remote name of a given socket connection.
Expand All @@ -23,15 +23,15 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>handle</parameter></term>
<term><parameter>socket</parameter></term>
<listitem>
<para>
The socket to get the name of.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>want_peer</parameter></term>
<term><parameter>remote</parameter></term>
<listitem>
<para>
If set to &true; the <literal>remote</literal> socket name will be returned, if set
Expand All @@ -46,7 +46,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The name of the socket.
The name of the socket,&return.falseforfailure;.
</para>
</refsect1>

Expand All @@ -59,7 +59,6 @@
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
7 changes: 3 additions & 4 deletions reference/stream/functions/stream-socket-recvfrom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>stream_socket_recvfrom</methodname>
<type class="union"><type>string</type><type>false</type></type><methodname>stream_socket_recvfrom</methodname>
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
<methodparam><type>int</type><parameter>length</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">address</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter role="reference">address</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>stream_socket_recvfrom</function> accepts
Expand Down Expand Up @@ -87,7 +87,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the read data, as a string
Returns the read data, as a string,&return.falseforfailure;.
</para>
</refsect1>

Expand Down Expand Up @@ -153,7 +153,6 @@ fclose($server);
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
7 changes: 3 additions & 4 deletions reference/stream/functions/stream-socket-sendto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>stream_socket_sendto</methodname>
<type class="union"><type>int</type><type>false</type></type><methodname>stream_socket_sendto</methodname>
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>address</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>address</parameter><initializer>""</initializer></methodparam>
</methodsynopsis>
<para>
Sends the specified <parameter>data</parameter> through the
Expand Down Expand Up @@ -81,7 +81,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a result code, as an integer.
Returns a result code, as an integer,&return.falseforfailure;.
</para>
</refsect1>

Expand Down Expand Up @@ -120,7 +120,6 @@ fclose($socket);
</simplelist>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
51 changes: 36 additions & 15 deletions reference/stream/functions/stream-socket-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>stream_socket_server</methodname>
<methodparam><type>string</type><parameter>local_socket</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">errno</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">errstr</parameter></methodparam>
<type class="union"><type>resource</type><type>false</type></type><methodname>stream_socket_server</methodname>
<methodparam><type>string</type><parameter>address</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">error_message</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>STREAM_SERVER_BIND | STREAM_SERVER_LISTEN</initializer></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Creates a stream or datagram socket on the specified
<parameter>local_socket</parameter>.
<parameter>address</parameter>.
</para>
<para>
This function only creates a socket, to begin accepting connections
Expand All @@ -30,7 +30,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>local_socket</parameter></term>
<term><parameter>address</parameter></term>
<listitem>
<para>
The type of socket created is determined by the transport specified
Expand All @@ -53,27 +53,27 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>errno</parameter></term>
<term><parameter>error_code</parameter></term>
<listitem>
<para>
If the optional <parameter>errno</parameter> and <parameter>errstr</parameter>
If the optional <parameter>error_code</parameter> and <parameter>error_message</parameter>
arguments are present they will be set to indicate the actual system
level error that occurred in the system-level <literal>socket()</literal>,
<literal>bind()</literal>, and <literal>listen()</literal> calls. If
the value returned in <parameter>errno</parameter> is
the value returned in <parameter>error_code</parameter> is
<literal>0</literal> and the function returned &false;, it is an
indication that the error occurred before the <literal>bind()</literal>
call. This is most likely due to a problem initializing the socket.
Note that the <parameter>errno</parameter> and
<parameter>errstr</parameter> arguments will always be passed by reference.
Note that the <parameter>error_code</parameter> and
<parameter>error_message</parameter> arguments will always be passed by reference.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>errstr</parameter></term>
<term><parameter>error_message</parameter></term>
<listitem>
<para>
See <parameter>errno</parameter> description.
See <parameter>error_code</parameter> description.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -110,6 +110,28 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>context</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down Expand Up @@ -186,7 +208,6 @@ do {
</simplelist>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
1 change: 0 additions & 1 deletion reference/url/functions/get-headers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ $headers = get_headers('http://example.com');
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
1 change: 0 additions & 1 deletion reference/url/functions/http-build-query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ pub=publicParent&pub_bar%5Bpub%5D=publicChild
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
3 changes: 1 addition & 2 deletions reference/url/functions/parse-url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>parse_url</methodname>
<type class="union"><type>int</type><type>string</type><type>array</type><type>null</type><type>false</type></type><methodname>parse_url</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>component</parameter><initializer>-1</initializer></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -281,7 +281,6 @@ array(3) {
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down