reference/phar/Phar/addFile.xml
f03806fcd8fe03a0501bd40b6e3939ff6589a1d2
...
...
@@ -1,22 +1,22 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.addfile">
3
+
<refentry xml:id="phar.addfile" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>Phar::addFile</refname>
6
6
<refpurpose>Add a file from the filesystem to the phar archive</refpurpose>
7
7
</refnamediv>
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
-
<methodsynopsis>
10
+
<methodsynopsis role="Phar">
11
11
<modifier>public</modifier> <type>void</type><methodname>Phar::addFile</methodname>
12
-
<methodparam><type>string</type><parameter>file</parameter></methodparam>
13
-
<methodparam choice="opt"><type>string</type><parameter>localname</parameter></methodparam>
12
+
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>localName</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
&phar.write;
16
16

17
17
<para>
18
18
With this method, any file or URL can be added to the phar archive. If
19
-
the optional second parameter <literal>localname</literal> is specified,
19
+
the optional second parameter <parameter>localName</parameter> is a &string;,
20
20
the file will be stored in the archive with that name, otherwise the
21
21
<literal>file</literal> parameter is used as the path to store within
22
22
the archive. URLs must have a localname or an exception is thrown.
...
...
@@ -29,7 +29,7 @@
29
29
<para>
30
30
<variablelist>
31
31
<varlistentry>
32
-
<term><parameter>file</parameter></term>
32
+
<term><parameter>filename</parameter></term>
33
33
<listitem>
34
34
<para>
35
35
Full or relative path to a file on disk to be added
...
...
@@ -38,7 +38,7 @@
38
38
</listitem>
39
39
</varlistentry>
40
40
<varlistentry>
41
-
<term><parameter>localname</parameter></term>
41
+
<term><parameter>localName</parameter></term>
42
42
<listitem>
43
43
<para>
44
44
Path that the file will be stored in the archive.
...
...
@@ -56,6 +56,28 @@
56
56
</para>
57
57
</refsect1>
58
58

59
+
<refsect1 role="changelog">
60
+
&reftitle.changelog;
61
+
<informaltable>
62
+
<tgroup cols="2">
63
+
<thead>
64
+
<row>
65
+
<entry>&Version;</entry>
66
+
<entry>&Description;</entry>
67
+
</row>
68
+
</thead>
69
+
<tbody>
70
+
<row>
71
+
<entry>8.0.0</entry>
72
+
<entry>
73
+
<parameter>localName</parameter> is now nullable.
74
+
</entry>
75
+
</row>
76
+
</tbody>
77
+
</tgroup>
78
+
</informaltable>
79
+
</refsect1>
80
+

59
81
<refsect1 role="examples">
60
82
&reftitle.examples;
61
83
<para>
...
...
@@ -86,6 +108,11 @@ try {
86
108
</para>
87
109
</refsect1>
88
110

111
+
<refsect1 role="notes">
112
+
&reftitle.notes;
113
+
&phar.note.performance;
114
+
</refsect1>
115
+

89
116
<refsect1 role="seealso">
90
117
&reftitle.seealso;
91
118
<para>
...
...
@@ -100,7 +127,6 @@ try {
100
127

101
128

102
129
</refentry>
103
-

104
130
<!-- Keep this comment at the end of the file
105
131
Local variables:
106
132
mode: sgml
107
133