Skip to content

Commit a1702b5

Browse files
authored
Generate a few ext/standard methods synopses from stubs - part 2 (#1014)
1 parent cf02a33 commit a1702b5

File tree

5 files changed

+48
-31
lines changed

5 files changed

+48
-31
lines changed

reference/stream/functions/stream-socket-get-name.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<refsect1 role="description">
1010
&reftitle.description;
1111
<methodsynopsis>
12-
<type>string</type><methodname>stream_socket_get_name</methodname>
13-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
14-
<methodparam><type>bool</type><parameter>want_peer</parameter></methodparam>
12+
<type class="union"><type>string</type><type>false</type></type><methodname>stream_socket_get_name</methodname>
13+
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
14+
<methodparam><type>bool</type><parameter>remote</parameter></methodparam>
1515
</methodsynopsis>
1616
<para>
1717
Returns the local or remote name of a given socket connection.
@@ -23,15 +23,15 @@
2323
<para>
2424
<variablelist>
2525
<varlistentry>
26-
<term><parameter>handle</parameter></term>
26+
<term><parameter>socket</parameter></term>
2727
<listitem>
2828
<para>
2929
The socket to get the name of.
3030
</para>
3131
</listitem>
3232
</varlistentry>
3333
<varlistentry>
34-
<term><parameter>want_peer</parameter></term>
34+
<term><parameter>remote</parameter></term>
3535
<listitem>
3636
<para>
3737
If set to &true; the <literal>remote</literal> socket name will be returned, if set
@@ -46,7 +46,7 @@
4646
<refsect1 role="returnvalues">
4747
&reftitle.returnvalues;
4848
<para>
49-
The name of the socket.
49+
The name of the socket,&return.falseforfailure;.
5050
</para>
5151
</refsect1>
5252

@@ -59,7 +59,6 @@
5959
</para>
6060
</refsect1>
6161
</refentry>
62-
6362
<!-- Keep this comment at the end of the file
6463
Local variables:
6564
mode: sgml

reference/stream/functions/stream-socket-recvfrom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<refsect1 role="description">
99
&reftitle.description;
1010
<methodsynopsis>
11-
<type>string</type><methodname>stream_socket_recvfrom</methodname>
11+
<type class="union"><type>string</type><type>false</type></type><methodname>stream_socket_recvfrom</methodname>
1212
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
1313
<methodparam><type>int</type><parameter>length</parameter></methodparam>
1414
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
15-
<methodparam choice="opt"><type>string</type><parameter role="reference">address</parameter></methodparam>
15+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter role="reference">address</parameter><initializer>&null;</initializer></methodparam>
1616
</methodsynopsis>
1717
<para>
1818
<function>stream_socket_recvfrom</function> accepts
@@ -87,7 +87,7 @@
8787
<refsect1 role="returnvalues">
8888
&reftitle.returnvalues;
8989
<para>
90-
Returns the read data, as a string
90+
Returns the read data, as a string,&return.falseforfailure;.
9191
</para>
9292
</refsect1>
9393

@@ -153,7 +153,6 @@ fclose($server);
153153
</refsect1>
154154

155155
</refentry>
156-
157156
<!-- Keep this comment at the end of the file
158157
Local variables:
159158
mode: sgml

reference/stream/functions/stream-socket-sendto.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<refsect1 role="description">
99
&reftitle.description;
1010
<methodsynopsis>
11-
<type>int</type><methodname>stream_socket_sendto</methodname>
11+
<type class="union"><type>int</type><type>false</type></type><methodname>stream_socket_sendto</methodname>
1212
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
1313
<methodparam><type>string</type><parameter>data</parameter></methodparam>
1414
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
15-
<methodparam choice="opt"><type>string</type><parameter>address</parameter></methodparam>
15+
<methodparam choice="opt"><type>string</type><parameter>address</parameter><initializer>""</initializer></methodparam>
1616
</methodsynopsis>
1717
<para>
1818
Sends the specified <parameter>data</parameter> through the
@@ -81,7 +81,7 @@
8181
<refsect1 role="returnvalues">
8282
&reftitle.returnvalues;
8383
<para>
84-
Returns a result code, as an integer.
84+
Returns a result code, as an integer,&return.falseforfailure;.
8585
</para>
8686
</refsect1>
8787

@@ -120,7 +120,6 @@ fclose($socket);
120120
</simplelist>
121121
</refsect1>
122122
</refentry>
123-
124123
<!-- Keep this comment at the end of the file
125124
Local variables:
126125
mode: sgml

reference/stream/functions/stream-socket-server.xml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
<refsect1 role="description">
99
&reftitle.description;
1010
<methodsynopsis>
11-
<type>resource</type><methodname>stream_socket_server</methodname>
12-
<methodparam><type>string</type><parameter>local_socket</parameter></methodparam>
13-
<methodparam choice="opt"><type>int</type><parameter role="reference">errno</parameter></methodparam>
14-
<methodparam choice="opt"><type>string</type><parameter role="reference">errstr</parameter></methodparam>
11+
<type class="union"><type>resource</type><type>false</type></type><methodname>stream_socket_server</methodname>
12+
<methodparam><type>string</type><parameter>address</parameter></methodparam>
13+
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
14+
<methodparam choice="opt"><type>string</type><parameter role="reference">error_message</parameter><initializer>&null;</initializer></methodparam>
1515
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>STREAM_SERVER_BIND | STREAM_SERVER_LISTEN</initializer></methodparam>
16-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
16+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
1717
</methodsynopsis>
1818
<para>
1919
Creates a stream or datagram socket on the specified
20-
<parameter>local_socket</parameter>.
20+
<parameter>address</parameter>.
2121
</para>
2222
<para>
2323
This function only creates a socket, to begin accepting connections
@@ -30,7 +30,7 @@
3030
<para>
3131
<variablelist>
3232
<varlistentry>
33-
<term><parameter>local_socket</parameter></term>
33+
<term><parameter>address</parameter></term>
3434
<listitem>
3535
<para>
3636
The type of socket created is determined by the transport specified
@@ -53,27 +53,27 @@
5353
</listitem>
5454
</varlistentry>
5555
<varlistentry>
56-
<term><parameter>errno</parameter></term>
56+
<term><parameter>error_code</parameter></term>
5757
<listitem>
5858
<para>
59-
If the optional <parameter>errno</parameter> and <parameter>errstr</parameter>
59+
If the optional <parameter>error_code</parameter> and <parameter>error_message</parameter>
6060
arguments are present they will be set to indicate the actual system
6161
level error that occurred in the system-level <literal>socket()</literal>,
6262
<literal>bind()</literal>, and <literal>listen()</literal> calls. If
63-
the value returned in <parameter>errno</parameter> is
63+
the value returned in <parameter>error_code</parameter> is
6464
<literal>0</literal> and the function returned &false;, it is an
6565
indication that the error occurred before the <literal>bind()</literal>
6666
call. This is most likely due to a problem initializing the socket.
67-
Note that the <parameter>errno</parameter> and
68-
<parameter>errstr</parameter> arguments will always be passed by reference.
67+
Note that the <parameter>error_code</parameter> and
68+
<parameter>error_message</parameter> arguments will always be passed by reference.
6969
</para>
7070
</listitem>
7171
</varlistentry>
7272
<varlistentry>
73-
<term><parameter>errstr</parameter></term>
73+
<term><parameter>error_message</parameter></term>
7474
<listitem>
7575
<para>
76-
See <parameter>errno</parameter> description.
76+
See <parameter>error_code</parameter> description.
7777
</para>
7878
</listitem>
7979
</varlistentry>
@@ -110,6 +110,28 @@
110110
</para>
111111
</refsect1>
112112

113+
<refsect1 role="changelog">
114+
&reftitle.changelog;
115+
<informaltable>
116+
<tgroup cols="2">
117+
<thead>
118+
<row>
119+
<entry>&Version;</entry>
120+
<entry>&Description;</entry>
121+
</row>
122+
</thead>
123+
<tbody>
124+
<row>
125+
<entry>8.0.0</entry>
126+
<entry>
127+
<parameter>context</parameter> is nullable now.
128+
</entry>
129+
</row>
130+
</tbody>
131+
</tgroup>
132+
</informaltable>
133+
</refsect1>
134+
113135
<refsect1 role="examples">
114136
&reftitle.examples;
115137
<para>
@@ -186,7 +208,6 @@ do {
186208
</simplelist>
187209
</refsect1>
188210
</refentry>
189-
190211
<!-- Keep this comment at the end of the file
191212
Local variables:
192213
mode: sgml

reference/url/functions/http-build-query.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ pub=publicParent&pub_bar%5Bpub%5D=publicChild
249249
</refsect1>
250250

251251
</refentry>
252-
253252
<!-- Keep this comment at the end of the file
254253
Local variables:
255254
mode: sgml

0 commit comments

Comments
 (0)