[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: Generate ext/standard method synopses based on stubs - part 4
From: Máté_Kocsis_via_GitHub <noreply () php ! net>
Date: 2021-10-27 9:35:09
Message-ID: DwScEH62HXuX4gZg5l8PUh2bqBUUdEUwwDYuFdaCQBo () main ! php ! net
[Download RAW message or body]
Author: Máté Kocsis (kocsismate)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2021-10-27T11:35:47+02:00
Commit: https://github.com/php/doc-en/commit/6a5b227850bbad1ec81fd52b6a08e12e3f2c03ac
Raw diff: https://github.com/php/doc-en/commit/6a5b227850bbad1ec81fd52b6a08e12e3f2c03ac.diff
Generate ext/standard method synopses based on stubs - part 4
Closes GH-1022.
Changed paths:
M reference/stream/functions/stream-context-create.xml
M reference/stream/functions/stream-context-get-default.xml
M reference/stream/functions/stream-context-get-params.xml
M reference/stream/functions/stream-copy-to-stream.xml
Diff:
diff --git a/reference/stream/functions/stream-context-create.xml \
b/reference/stream/functions/stream-context-create.xml index 9e97278b83..8f8a733777 \
100644
--- a/reference/stream/functions/stream-context-create.xml
+++ b/reference/stream/functions/stream-context-create.xml
@@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>stream_context_create</methodname>
- <methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
- <methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
+ <methodparam choice="opt"><type \
class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
+ <methodparam choice="opt"><type \
class="union"><type>array</type><type>null</type></type><parameter>params</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Creates and returns a stream context with any options supplied in
@@ -27,10 +27,10 @@
<listitem>
<para>
Must be an associative array of associative arrays in the format
- <literal>$arr['wrapper']['option'] = $value</literal>. Refer to <link \
linkend="context">context options</link> for a list of available wrappers and \
options. + <literal>$arr['wrapper']['option'] = $value</literal>, or &null;. \
Refer to <link linkend="context">context options</link> for a list of available \
wrappers and options. </para>
<para>
- Default to an empty array.
+ Defaults to &null;.
</para>
</listitem>
</varlistentry>
@@ -39,7 +39,7 @@
<listitem>
<para>
Must be an associative array in the format
- <literal>$arr['parameter'] = $value</literal>.
+ <literal>$arr['parameter'] = $value</literal>, or &null;.
Refer to <link linkend="context.params">context parameters</link> for
a listing of standard stream parameters.
</para>
@@ -56,6 +56,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>options</parameter> and <parameter>params</parameter> are now \
nullable. + </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<example>
@@ -93,7 +115,6 @@ fclose($fp);
</simplelist>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/stream/functions/stream-context-get-default.xml \
b/reference/stream/functions/stream-context-get-default.xml index \
2fc938d66d..91c5b6ff87 100644
--- a/reference/stream/functions/stream-context-get-default.xml
+++ b/reference/stream/functions/stream-context-get-default.xml
@@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>stream_context_get_default</methodname>
- <methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
+ <methodparam choice="opt"><type \
class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Returns the default stream context which is used whenever file operations
@@ -31,7 +31,7 @@
<simpara>
<parameter>options</parameter> must be an associative
array of associative arrays in the format
- <literal>$arr['wrapper']['option'] = $value</literal>.
+ <literal>$arr['wrapper']['option'] = $value</literal>, or &null;.
</simpara>
</listitem>
</varlistentry>
@@ -46,6 +46,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>options</parameter> is now nullable.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -105,7 +127,6 @@ readfile('http://www.example.com', false, $alternate);
</refsect1><!-- }}} -->
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
diff --git a/reference/stream/functions/stream-context-get-params.xml \
b/reference/stream/functions/stream-context-get-params.xml index \
f69f88790d..13003dc72f 100644
--- a/reference/stream/functions/stream-context-get-params.xml
+++ b/reference/stream/functions/stream-context-get-params.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-
<refentry xml:id="function.stream-context-get-params" \
xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> \
<refnamediv> <refname>stream_context_get_params</refname>
@@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>stream_context_get_params</methodname>
- <methodparam><type>resource</type><parameter>stream_or_context</parameter></methodparam>
+ <methodparam><type>resource</type><parameter>context</parameter></methodparam>
</methodsynopsis>
<para>
Retrieves parameter and options information from the stream or context.
@@ -23,7 +22,7 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>stream_or_context</parameter></term>
+ <term><parameter>context</parameter></term>
<listitem>
<para>
A stream <type>resource</type> or a
@@ -88,7 +87,6 @@ array(2) {
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -109,4 +107,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-
diff --git a/reference/stream/functions/stream-copy-to-stream.xml \
b/reference/stream/functions/stream-copy-to-stream.xml index 85cdaf0bbc..2e26b6e79c \
100644
--- a/reference/stream/functions/stream-copy-to-stream.xml
+++ b/reference/stream/functions/stream-copy-to-stream.xml
@@ -9,18 +9,18 @@
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>false</type></type><methodname>stream_copy_to_stream</methodname>
- <methodparam><type>resource</type><parameter>source</parameter></methodparam>
- <methodparam><type>resource</type><parameter>dest</parameter></methodparam>
- <methodparam choice="opt"><type>int</type><parameter>maxlength</parameter><initializer>-1</initializer></methodparam>
+ <methodparam><type>resource</type><parameter>from</parameter></methodparam>
+ <methodparam><type>resource</type><parameter>to</parameter></methodparam>
+ <methodparam choice="opt"><type \
class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
- Makes a copy of up to <parameter>maxlength</parameter> bytes
+ Makes a copy of up to <parameter>length</parameter> bytes
of data from the current position (or from the
<parameter>offset</parameter> position, if specified) in
- <parameter>source</parameter> to <parameter>dest</parameter>. If
- <parameter>maxlength</parameter> is not specified, all remaining content in
- <parameter>source</parameter> will be copied.
+ <parameter>from</parameter> to <parameter>to</parameter>. If
+ <parameter>length</parameter> is &null;, all remaining content in
+ <parameter>from</parameter> will be copied.
</para>
</refsect1>
@@ -29,7 +29,7 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>source</parameter></term>
+ <term><parameter>from</parameter></term>
<listitem>
<para>
The source stream
@@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>dest</parameter></term>
+ <term><parameter>to</parameter></term>
<listitem>
<para>
The destination stream
@@ -45,10 +45,10 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>maxlength</parameter></term>
+ <term><parameter>length</parameter></term>
<listitem>
<para>
- Maximum bytes to copy
+ Maximum bytes to copy. By default all bytes left are copied.
</para>
</listitem>
</varlistentry>
@@ -67,10 +67,32 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the total count of bytes copied, &return.falseforfailure;.
+ Returns the total count of bytes copied,&return.falseforfailure;.
</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>length</parameter> is now nullable.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -102,7 +124,6 @@ echo stream_copy_to_stream($src, $dest2) . " bytes copied to \
remainder.txt\n"; </para>
</refsect1>
</refentry>
-
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic