add flags parameter to ZipArchive::addFromString

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349280 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Remi Collet 2020-03-02 16:15:06 +00:00
parent 271d8379a9
commit 7e49b1947f

View file

@ -11,6 +11,7 @@
<type>bool</type><methodname>ZipArchive::addFromString</methodname>
<methodparam><type>string</type><parameter>localname</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Add a file to a ZIP archive using its contents.
@ -38,6 +39,20 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Bitmask consisting of
<constant>ZipArchive::FL_OVERWRITE</constant>,
<constant>ZipArchive::FL_ENC_GUESS</constant>,
<constant>ZipArchive::FL_ENC_UTF_8</constant>,
<constant>ZipArchive::FL_ENC_CP437</constant>.
The behaviour of these constants is described on the
<link linkend="zip.constants">ZIP constants</link> page.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
@ -47,6 +62,31 @@
&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>
<row>
<entry>8.0.0 / 1.18.0</entry>
<entry>
<parameter>flags</parameter> was added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>