reference/phar/Phar/setStub.xml
9c828621cbce488cf6306b21c39e208f847eabd5
...
...
@@ -7,10 +7,10 @@
7
7
</refnamediv>
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
-
<methodsynopsis>
10
+
<methodsynopsis role="Phar">
11
11
<modifier>public</modifier> <type>bool</type><methodname>Phar::setStub</methodname>
12
-
<methodparam><type>string</type><parameter>stub</parameter></methodparam>
13
-
<methodparam choice="opt"><type>int</type><parameter>len</parameter><initializer>-1</initializer></methodparam>
12
+
<methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>stub</parameter></methodparam>
13
+
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>-1</initializer></methodparam>
14
14
</methodsynopsis>
15
15
&phar.write;
16
16

...
...
@@ -58,7 +58,7 @@ include 'phar://myphar.phar/somefile.php';
58
58
</listitem>
59
59
</varlistentry>
60
60
<varlistentry>
61
-
<term><parameter>len</parameter></term>
61
+
<term><parameter>length</parameter></term>
62
62
<listitem>
63
63
<para>
64
64
...
...
@@ -87,6 +87,31 @@ include 'phar://myphar.phar/somefile.php';
87
87
</para>
88
88
</refsect1>
89
89

90
+
<refsect1 role="changelog">
91
+
&reftitle.changelog;
92
+
<informaltable>
93
+
<tgroup cols="2">
94
+
<thead>
95
+
<row>
96
+
<entry>&Version;</entry>
97
+
<entry>&Description;</entry>
98
+
</row>
99
+
</thead>
100
+
<tbody>
101
+
<row>
102
+
<entry>8.3.0</entry>
103
+
<entry>
104
+
Calling <methodname>Phar::setStub</methodname> with a
105
+
<type>resource</type> and a <parameter>length</parameter>
106
+
is now deprecated. Such calls should be replaced by:
107
+
<code>$phar->setStub(stream_get_contents($resource));</code>
108
+
</entry>
109
+
</row>
110
+
</tbody>
111
+
</tgroup>
112
+
</informaltable>
113
+
</refsect1>
114
+

90
115
<refsect1 role="examples">
91
116
&reftitle.examples;
92
117
<para>
...
...
@@ -126,30 +151,6 @@ string(83) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT
126
151
</para>
127
152
</refsect1>
128
153

129
-
<refsect1 role="changelog">
130
-
&reftitle.changelog;
131
-
<para>
132
-
<informaltable>
133
-
<tgroup cols="2">
134
-
<thead>
135
-
<row>
136
-
<entry>&Version;</entry>
137
-
<entry>&Description;</entry>
138
-
</row>
139
-
</thead>
140
-
<tbody>
141
-
<row>
142
-
<entry>5.4.0</entry>
143
-
<entry>
144
-
Added <parameter>len</parameter> parameter.
145
-
</entry>
146
-
</row>
147
-
</tbody>
148
-
</tgroup>
149
-
</informaltable>
150
-
</para>
151
-
</refsect1>
152
-
153
154
<refsect1 role="seealso">
154
155
&reftitle.seealso;
155
156
<para>
156
157