xref: /PHP-8.1/ext/zip/php_zip_arginfo.h (revision 62a650ab)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 47e6ec88f73999cc934b41f4f53995af95d2e6c3 */
3 
4 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
5 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
6 ZEND_END_ARG_INFO()
7 
8 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_close, 0, 1, IS_VOID, 0)
9 	ZEND_ARG_INFO(0, zip)
10 ZEND_END_ARG_INFO()
11 
12 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_read, 0, 0, 1)
13 	ZEND_ARG_INFO(0, zip)
14 ZEND_END_ARG_INFO()
15 
16 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_open, 0, 2, _IS_BOOL, 0)
17 	ZEND_ARG_INFO(0, zip_dp)
18 	ZEND_ARG_INFO(0, zip_entry)
19 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"rb\"")
20 ZEND_END_ARG_INFO()
21 
22 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zip_entry_close, 0, 1, _IS_BOOL, 0)
23 	ZEND_ARG_INFO(0, zip_entry)
24 ZEND_END_ARG_INFO()
25 
26 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_read, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
27 	ZEND_ARG_INFO(0, zip_entry)
28 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "1024")
29 ZEND_END_ARG_INFO()
30 
31 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
32 	ZEND_ARG_INFO(0, zip_entry)
33 ZEND_END_ARG_INFO()
34 
35 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zip_entry_compressedsize, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
36 	ZEND_ARG_INFO(0, zip_entry)
37 ZEND_END_ARG_INFO()
38 
39 #define arginfo_zip_entry_filesize arginfo_zip_entry_compressedsize
40 
41 #define arginfo_zip_entry_compressionmethod arginfo_zip_entry_name
42 
43 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_open, 0, 1, MAY_BE_BOOL|MAY_BE_LONG)
44 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
45 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
46 ZEND_END_ARG_INFO()
47 
48 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setPassword, 0, 1, _IS_BOOL, 0)
49 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
50 ZEND_END_ARG_INFO()
51 
52 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_close, 0, 0, _IS_BOOL, 0)
53 ZEND_END_ARG_INFO()
54 
55 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_count, 0, 0, IS_LONG, 0)
56 ZEND_END_ARG_INFO()
57 
58 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_getStatusString, 0, 0, IS_STRING, 0)
59 ZEND_END_ARG_INFO()
60 
61 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_addEmptyDir, 0, 1, _IS_BOOL, 0)
62 	ZEND_ARG_TYPE_INFO(0, dirname, IS_STRING, 0)
63 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
64 ZEND_END_ARG_INFO()
65 
66 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_addFromString, 0, 2, _IS_BOOL, 0)
67 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
68 	ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
69 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ZipArchive::FL_OVERWRITE")
70 ZEND_END_ARG_INFO()
71 
72 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_addFile, 0, 1, _IS_BOOL, 0)
73 	ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0)
74 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, entryname, IS_STRING, 0, "\"\"")
75 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
76 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
77 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ZipArchive::FL_OVERWRITE")
78 ZEND_END_ARG_INFO()
79 
80 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_replaceFile, 0, 2, _IS_BOOL, 0)
81 	ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0)
82 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
83 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
84 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
85 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
86 ZEND_END_ARG_INFO()
87 
88 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_addGlob, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
89 	ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
90 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
91 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
92 ZEND_END_ARG_INFO()
93 
94 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_addPattern, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
95 	ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
96 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, path, IS_STRING, 0, "\".\"")
97 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
98 ZEND_END_ARG_INFO()
99 
100 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_renameIndex, 0, 2, _IS_BOOL, 0)
101 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
102 	ZEND_ARG_TYPE_INFO(0, new_name, IS_STRING, 0)
103 ZEND_END_ARG_INFO()
104 
105 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_renameName, 0, 2, _IS_BOOL, 0)
106 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
107 	ZEND_ARG_TYPE_INFO(0, new_name, IS_STRING, 0)
108 ZEND_END_ARG_INFO()
109 
110 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setArchiveComment, 0, 1, _IS_BOOL, 0)
111 	ZEND_ARG_TYPE_INFO(0, comment, IS_STRING, 0)
112 ZEND_END_ARG_INFO()
113 
114 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_getArchiveComment, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
115 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
116 ZEND_END_ARG_INFO()
117 
118 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setCommentIndex, 0, 2, _IS_BOOL, 0)
119 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
120 	ZEND_ARG_TYPE_INFO(0, comment, IS_STRING, 0)
121 ZEND_END_ARG_INFO()
122 
123 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setCommentName, 0, 2, _IS_BOOL, 0)
124 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
125 	ZEND_ARG_TYPE_INFO(0, comment, IS_STRING, 0)
126 ZEND_END_ARG_INFO()
127 
128 #if defined(HAVE_SET_MTIME)
129 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setMtimeIndex, 0, 2, _IS_BOOL, 0)
130 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
131 	ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
132 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
133 ZEND_END_ARG_INFO()
134 #endif
135 
136 #if defined(HAVE_SET_MTIME)
137 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setMtimeName, 0, 2, _IS_BOOL, 0)
138 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
139 	ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
140 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
141 ZEND_END_ARG_INFO()
142 #endif
143 
144 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_getCommentIndex, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
145 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
146 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
147 ZEND_END_ARG_INFO()
148 
149 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_getCommentName, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
150 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
151 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
152 ZEND_END_ARG_INFO()
153 
154 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_deleteIndex, 0, 1, _IS_BOOL, 0)
155 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
156 ZEND_END_ARG_INFO()
157 
158 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_deleteName, 0, 1, _IS_BOOL, 0)
159 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
160 ZEND_END_ARG_INFO()
161 
162 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_statName, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
163 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
164 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
165 ZEND_END_ARG_INFO()
166 
167 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_statIndex, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
168 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
169 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
170 ZEND_END_ARG_INFO()
171 
172 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_locateName, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
173 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
174 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
175 ZEND_END_ARG_INFO()
176 
177 #define arginfo_class_ZipArchive_getNameIndex arginfo_class_ZipArchive_getCommentIndex
178 
179 #define arginfo_class_ZipArchive_unchangeArchive arginfo_class_ZipArchive_close
180 
181 #define arginfo_class_ZipArchive_unchangeAll arginfo_class_ZipArchive_close
182 
183 #define arginfo_class_ZipArchive_unchangeIndex arginfo_class_ZipArchive_deleteIndex
184 
185 #define arginfo_class_ZipArchive_unchangeName arginfo_class_ZipArchive_deleteName
186 
187 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_extractTo, 0, 1, _IS_BOOL, 0)
188 	ZEND_ARG_TYPE_INFO(0, pathto, IS_STRING, 0)
189 	ZEND_ARG_TYPE_MASK(0, files, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null")
190 ZEND_END_ARG_INFO()
191 
192 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_getFromName, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
193 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
194 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "0")
195 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
196 ZEND_END_ARG_INFO()
197 
198 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_ZipArchive_getFromIndex, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
199 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
200 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, len, IS_LONG, 0, "0")
201 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
202 ZEND_END_ARG_INFO()
203 
204 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_getStream, 0, 0, 1)
205 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
206 ZEND_END_ARG_INFO()
207 
208 #if defined(ZIP_OPSYS_DEFAULT)
209 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesName, 0, 3, _IS_BOOL, 0)
210 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
211 	ZEND_ARG_TYPE_INFO(0, opsys, IS_LONG, 0)
212 	ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
213 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
214 ZEND_END_ARG_INFO()
215 #endif
216 
217 #if defined(ZIP_OPSYS_DEFAULT)
218 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesIndex, 0, 3, _IS_BOOL, 0)
219 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
220 	ZEND_ARG_TYPE_INFO(0, opsys, IS_LONG, 0)
221 	ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
222 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
223 ZEND_END_ARG_INFO()
224 #endif
225 
226 #if defined(ZIP_OPSYS_DEFAULT)
227 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesName, 0, 3, _IS_BOOL, 0)
228 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
229 	ZEND_ARG_INFO(1, opsys)
230 	ZEND_ARG_INFO(1, attr)
231 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
232 ZEND_END_ARG_INFO()
233 #endif
234 
235 #if defined(ZIP_OPSYS_DEFAULT)
236 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesIndex, 0, 3, _IS_BOOL, 0)
237 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
238 	ZEND_ARG_INFO(1, opsys)
239 	ZEND_ARG_INFO(1, attr)
240 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
241 ZEND_END_ARG_INFO()
242 #endif
243 
244 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setCompressionName, 0, 2, _IS_BOOL, 0)
245 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
246 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
247 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compflags, IS_LONG, 0, "0")
248 ZEND_END_ARG_INFO()
249 
250 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setCompressionIndex, 0, 2, _IS_BOOL, 0)
251 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
252 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
253 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compflags, IS_LONG, 0, "0")
254 ZEND_END_ARG_INFO()
255 
256 #if defined(HAVE_ENCRYPTION)
257 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setEncryptionName, 0, 2, _IS_BOOL, 0)
258 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
259 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
260 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
261 ZEND_END_ARG_INFO()
262 #endif
263 
264 #if defined(HAVE_ENCRYPTION)
265 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setEncryptionIndex, 0, 2, _IS_BOOL, 0)
266 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
267 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
268 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
269 ZEND_END_ARG_INFO()
270 #endif
271 
272 #if defined(HAVE_PROGRESS_CALLBACK)
273 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_registerProgressCallback, 0, 2, _IS_BOOL, 0)
274 	ZEND_ARG_TYPE_INFO(0, rate, IS_DOUBLE, 0)
275 	ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
276 ZEND_END_ARG_INFO()
277 #endif
278 
279 #if defined(HAVE_CANCEL_CALLBACK)
280 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_registerCancelCallback, 0, 1, _IS_BOOL, 0)
281 	ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
282 ZEND_END_ARG_INFO()
283 #endif
284 
285 #if defined(HAVE_METHOD_SUPPORTED)
286 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 1, _IS_BOOL, 0)
287 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
288 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc, _IS_BOOL, 0, "true")
289 ZEND_END_ARG_INFO()
290 #endif
291 
292 #if defined(HAVE_METHOD_SUPPORTED)
293 #define arginfo_class_ZipArchive_isEncryptionMethodSupported arginfo_class_ZipArchive_isCompressionMethodSupported
294 #endif
295 
296 
297 ZEND_FUNCTION(zip_open);
298 ZEND_FUNCTION(zip_close);
299 ZEND_FUNCTION(zip_read);
300 ZEND_FUNCTION(zip_entry_open);
301 ZEND_FUNCTION(zip_entry_close);
302 ZEND_FUNCTION(zip_entry_read);
303 ZEND_FUNCTION(zip_entry_name);
304 ZEND_FUNCTION(zip_entry_compressedsize);
305 ZEND_FUNCTION(zip_entry_filesize);
306 ZEND_FUNCTION(zip_entry_compressionmethod);
307 ZEND_METHOD(ZipArchive, open);
308 ZEND_METHOD(ZipArchive, setPassword);
309 ZEND_METHOD(ZipArchive, close);
310 ZEND_METHOD(ZipArchive, count);
311 ZEND_METHOD(ZipArchive, getStatusString);
312 ZEND_METHOD(ZipArchive, addEmptyDir);
313 ZEND_METHOD(ZipArchive, addFromString);
314 ZEND_METHOD(ZipArchive, addFile);
315 ZEND_METHOD(ZipArchive, replaceFile);
316 ZEND_METHOD(ZipArchive, addGlob);
317 ZEND_METHOD(ZipArchive, addPattern);
318 ZEND_METHOD(ZipArchive, renameIndex);
319 ZEND_METHOD(ZipArchive, renameName);
320 ZEND_METHOD(ZipArchive, setArchiveComment);
321 ZEND_METHOD(ZipArchive, getArchiveComment);
322 ZEND_METHOD(ZipArchive, setCommentIndex);
323 ZEND_METHOD(ZipArchive, setCommentName);
324 #if defined(HAVE_SET_MTIME)
325 ZEND_METHOD(ZipArchive, setMtimeIndex);
326 #endif
327 #if defined(HAVE_SET_MTIME)
328 ZEND_METHOD(ZipArchive, setMtimeName);
329 #endif
330 ZEND_METHOD(ZipArchive, getCommentIndex);
331 ZEND_METHOD(ZipArchive, getCommentName);
332 ZEND_METHOD(ZipArchive, deleteIndex);
333 ZEND_METHOD(ZipArchive, deleteName);
334 ZEND_METHOD(ZipArchive, statName);
335 ZEND_METHOD(ZipArchive, statIndex);
336 ZEND_METHOD(ZipArchive, locateName);
337 ZEND_METHOD(ZipArchive, getNameIndex);
338 ZEND_METHOD(ZipArchive, unchangeArchive);
339 ZEND_METHOD(ZipArchive, unchangeAll);
340 ZEND_METHOD(ZipArchive, unchangeIndex);
341 ZEND_METHOD(ZipArchive, unchangeName);
342 ZEND_METHOD(ZipArchive, extractTo);
343 ZEND_METHOD(ZipArchive, getFromName);
344 ZEND_METHOD(ZipArchive, getFromIndex);
345 ZEND_METHOD(ZipArchive, getStream);
346 #if defined(ZIP_OPSYS_DEFAULT)
347 ZEND_METHOD(ZipArchive, setExternalAttributesName);
348 #endif
349 #if defined(ZIP_OPSYS_DEFAULT)
350 ZEND_METHOD(ZipArchive, setExternalAttributesIndex);
351 #endif
352 #if defined(ZIP_OPSYS_DEFAULT)
353 ZEND_METHOD(ZipArchive, getExternalAttributesName);
354 #endif
355 #if defined(ZIP_OPSYS_DEFAULT)
356 ZEND_METHOD(ZipArchive, getExternalAttributesIndex);
357 #endif
358 ZEND_METHOD(ZipArchive, setCompressionName);
359 ZEND_METHOD(ZipArchive, setCompressionIndex);
360 #if defined(HAVE_ENCRYPTION)
361 ZEND_METHOD(ZipArchive, setEncryptionName);
362 #endif
363 #if defined(HAVE_ENCRYPTION)
364 ZEND_METHOD(ZipArchive, setEncryptionIndex);
365 #endif
366 #if defined(HAVE_PROGRESS_CALLBACK)
367 ZEND_METHOD(ZipArchive, registerProgressCallback);
368 #endif
369 #if defined(HAVE_CANCEL_CALLBACK)
370 ZEND_METHOD(ZipArchive, registerCancelCallback);
371 #endif
372 #if defined(HAVE_METHOD_SUPPORTED)
373 ZEND_METHOD(ZipArchive, isCompressionMethodSupported);
374 #endif
375 #if defined(HAVE_METHOD_SUPPORTED)
376 ZEND_METHOD(ZipArchive, isEncryptionMethodSupported);
377 #endif
378 
379 
380 static const zend_function_entry ext_functions[] = {
381 	ZEND_DEP_FE(zip_open, arginfo_zip_open)
382 	ZEND_DEP_FE(zip_close, arginfo_zip_close)
383 	ZEND_DEP_FE(zip_read, arginfo_zip_read)
384 	ZEND_DEP_FE(zip_entry_open, arginfo_zip_entry_open)
385 	ZEND_DEP_FE(zip_entry_close, arginfo_zip_entry_close)
386 	ZEND_DEP_FE(zip_entry_read, arginfo_zip_entry_read)
387 	ZEND_DEP_FE(zip_entry_name, arginfo_zip_entry_name)
388 	ZEND_DEP_FE(zip_entry_compressedsize, arginfo_zip_entry_compressedsize)
389 	ZEND_DEP_FE(zip_entry_filesize, arginfo_zip_entry_filesize)
390 	ZEND_DEP_FE(zip_entry_compressionmethod, arginfo_zip_entry_compressionmethod)
391 	ZEND_FE_END
392 };
393 
394 
395 static const zend_function_entry class_ZipArchive_methods[] = {
396 	ZEND_ME(ZipArchive, open, arginfo_class_ZipArchive_open, ZEND_ACC_PUBLIC)
397 	ZEND_ME(ZipArchive, setPassword, arginfo_class_ZipArchive_setPassword, ZEND_ACC_PUBLIC)
398 	ZEND_ME(ZipArchive, close, arginfo_class_ZipArchive_close, ZEND_ACC_PUBLIC)
399 	ZEND_ME(ZipArchive, count, arginfo_class_ZipArchive_count, ZEND_ACC_PUBLIC)
400 	ZEND_ME(ZipArchive, getStatusString, arginfo_class_ZipArchive_getStatusString, ZEND_ACC_PUBLIC)
401 	ZEND_ME(ZipArchive, addEmptyDir, arginfo_class_ZipArchive_addEmptyDir, ZEND_ACC_PUBLIC)
402 	ZEND_ME(ZipArchive, addFromString, arginfo_class_ZipArchive_addFromString, ZEND_ACC_PUBLIC)
403 	ZEND_ME(ZipArchive, addFile, arginfo_class_ZipArchive_addFile, ZEND_ACC_PUBLIC)
404 	ZEND_ME(ZipArchive, replaceFile, arginfo_class_ZipArchive_replaceFile, ZEND_ACC_PUBLIC)
405 	ZEND_ME(ZipArchive, addGlob, arginfo_class_ZipArchive_addGlob, ZEND_ACC_PUBLIC)
406 	ZEND_ME(ZipArchive, addPattern, arginfo_class_ZipArchive_addPattern, ZEND_ACC_PUBLIC)
407 	ZEND_ME(ZipArchive, renameIndex, arginfo_class_ZipArchive_renameIndex, ZEND_ACC_PUBLIC)
408 	ZEND_ME(ZipArchive, renameName, arginfo_class_ZipArchive_renameName, ZEND_ACC_PUBLIC)
409 	ZEND_ME(ZipArchive, setArchiveComment, arginfo_class_ZipArchive_setArchiveComment, ZEND_ACC_PUBLIC)
410 	ZEND_ME(ZipArchive, getArchiveComment, arginfo_class_ZipArchive_getArchiveComment, ZEND_ACC_PUBLIC)
411 	ZEND_ME(ZipArchive, setCommentIndex, arginfo_class_ZipArchive_setCommentIndex, ZEND_ACC_PUBLIC)
412 	ZEND_ME(ZipArchive, setCommentName, arginfo_class_ZipArchive_setCommentName, ZEND_ACC_PUBLIC)
413 #if defined(HAVE_SET_MTIME)
414 	ZEND_ME(ZipArchive, setMtimeIndex, arginfo_class_ZipArchive_setMtimeIndex, ZEND_ACC_PUBLIC)
415 #endif
416 #if defined(HAVE_SET_MTIME)
417 	ZEND_ME(ZipArchive, setMtimeName, arginfo_class_ZipArchive_setMtimeName, ZEND_ACC_PUBLIC)
418 #endif
419 	ZEND_ME(ZipArchive, getCommentIndex, arginfo_class_ZipArchive_getCommentIndex, ZEND_ACC_PUBLIC)
420 	ZEND_ME(ZipArchive, getCommentName, arginfo_class_ZipArchive_getCommentName, ZEND_ACC_PUBLIC)
421 	ZEND_ME(ZipArchive, deleteIndex, arginfo_class_ZipArchive_deleteIndex, ZEND_ACC_PUBLIC)
422 	ZEND_ME(ZipArchive, deleteName, arginfo_class_ZipArchive_deleteName, ZEND_ACC_PUBLIC)
423 	ZEND_ME(ZipArchive, statName, arginfo_class_ZipArchive_statName, ZEND_ACC_PUBLIC)
424 	ZEND_ME(ZipArchive, statIndex, arginfo_class_ZipArchive_statIndex, ZEND_ACC_PUBLIC)
425 	ZEND_ME(ZipArchive, locateName, arginfo_class_ZipArchive_locateName, ZEND_ACC_PUBLIC)
426 	ZEND_ME(ZipArchive, getNameIndex, arginfo_class_ZipArchive_getNameIndex, ZEND_ACC_PUBLIC)
427 	ZEND_ME(ZipArchive, unchangeArchive, arginfo_class_ZipArchive_unchangeArchive, ZEND_ACC_PUBLIC)
428 	ZEND_ME(ZipArchive, unchangeAll, arginfo_class_ZipArchive_unchangeAll, ZEND_ACC_PUBLIC)
429 	ZEND_ME(ZipArchive, unchangeIndex, arginfo_class_ZipArchive_unchangeIndex, ZEND_ACC_PUBLIC)
430 	ZEND_ME(ZipArchive, unchangeName, arginfo_class_ZipArchive_unchangeName, ZEND_ACC_PUBLIC)
431 	ZEND_ME(ZipArchive, extractTo, arginfo_class_ZipArchive_extractTo, ZEND_ACC_PUBLIC)
432 	ZEND_ME(ZipArchive, getFromName, arginfo_class_ZipArchive_getFromName, ZEND_ACC_PUBLIC)
433 	ZEND_ME(ZipArchive, getFromIndex, arginfo_class_ZipArchive_getFromIndex, ZEND_ACC_PUBLIC)
434 	ZEND_ME(ZipArchive, getStream, arginfo_class_ZipArchive_getStream, ZEND_ACC_PUBLIC)
435 #if defined(ZIP_OPSYS_DEFAULT)
436 	ZEND_ME(ZipArchive, setExternalAttributesName, arginfo_class_ZipArchive_setExternalAttributesName, ZEND_ACC_PUBLIC)
437 #endif
438 #if defined(ZIP_OPSYS_DEFAULT)
439 	ZEND_ME(ZipArchive, setExternalAttributesIndex, arginfo_class_ZipArchive_setExternalAttributesIndex, ZEND_ACC_PUBLIC)
440 #endif
441 #if defined(ZIP_OPSYS_DEFAULT)
442 	ZEND_ME(ZipArchive, getExternalAttributesName, arginfo_class_ZipArchive_getExternalAttributesName, ZEND_ACC_PUBLIC)
443 #endif
444 #if defined(ZIP_OPSYS_DEFAULT)
445 	ZEND_ME(ZipArchive, getExternalAttributesIndex, arginfo_class_ZipArchive_getExternalAttributesIndex, ZEND_ACC_PUBLIC)
446 #endif
447 	ZEND_ME(ZipArchive, setCompressionName, arginfo_class_ZipArchive_setCompressionName, ZEND_ACC_PUBLIC)
448 	ZEND_ME(ZipArchive, setCompressionIndex, arginfo_class_ZipArchive_setCompressionIndex, ZEND_ACC_PUBLIC)
449 #if defined(HAVE_ENCRYPTION)
450 	ZEND_ME(ZipArchive, setEncryptionName, arginfo_class_ZipArchive_setEncryptionName, ZEND_ACC_PUBLIC)
451 #endif
452 #if defined(HAVE_ENCRYPTION)
453 	ZEND_ME(ZipArchive, setEncryptionIndex, arginfo_class_ZipArchive_setEncryptionIndex, ZEND_ACC_PUBLIC)
454 #endif
455 #if defined(HAVE_PROGRESS_CALLBACK)
456 	ZEND_ME(ZipArchive, registerProgressCallback, arginfo_class_ZipArchive_registerProgressCallback, ZEND_ACC_PUBLIC)
457 #endif
458 #if defined(HAVE_CANCEL_CALLBACK)
459 	ZEND_ME(ZipArchive, registerCancelCallback, arginfo_class_ZipArchive_registerCancelCallback, ZEND_ACC_PUBLIC)
460 #endif
461 #if defined(HAVE_METHOD_SUPPORTED)
462 	ZEND_ME(ZipArchive, isCompressionMethodSupported, arginfo_class_ZipArchive_isCompressionMethodSupported, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
463 #endif
464 #if defined(HAVE_METHOD_SUPPORTED)
465 	ZEND_ME(ZipArchive, isEncryptionMethodSupported, arginfo_class_ZipArchive_isEncryptionMethodSupported, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
466 #endif
467 	ZEND_FE_END
468 };
469 
register_class_ZipArchive(zend_class_entry * class_entry_Countable)470 static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry_Countable)
471 {
472 	zend_class_entry ce, *class_entry;
473 
474 	INIT_CLASS_ENTRY(ce, "ZipArchive", class_ZipArchive_methods);
475 	class_entry = zend_register_internal_class_ex(&ce, NULL);
476 	zend_class_implements(class_entry, 1, class_entry_Countable);
477 
478 	zval property_lastId_default_value;
479 	ZVAL_UNDEF(&property_lastId_default_value);
480 	zend_string *property_lastId_name = zend_string_init("lastId", sizeof("lastId") - 1, 1);
481 	zend_declare_typed_property(class_entry, property_lastId_name, &property_lastId_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
482 	zend_string_release(property_lastId_name);
483 
484 	zval property_status_default_value;
485 	ZVAL_UNDEF(&property_status_default_value);
486 	zend_string *property_status_name = zend_string_init("status", sizeof("status") - 1, 1);
487 	zend_declare_typed_property(class_entry, property_status_name, &property_status_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
488 	zend_string_release(property_status_name);
489 
490 	zval property_statusSys_default_value;
491 	ZVAL_UNDEF(&property_statusSys_default_value);
492 	zend_string *property_statusSys_name = zend_string_init("statusSys", sizeof("statusSys") - 1, 1);
493 	zend_declare_typed_property(class_entry, property_statusSys_name, &property_statusSys_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
494 	zend_string_release(property_statusSys_name);
495 
496 	zval property_numFiles_default_value;
497 	ZVAL_UNDEF(&property_numFiles_default_value);
498 	zend_string *property_numFiles_name = zend_string_init("numFiles", sizeof("numFiles") - 1, 1);
499 	zend_declare_typed_property(class_entry, property_numFiles_name, &property_numFiles_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
500 	zend_string_release(property_numFiles_name);
501 
502 	zval property_filename_default_value;
503 	ZVAL_UNDEF(&property_filename_default_value);
504 	zend_string *property_filename_name = zend_string_init("filename", sizeof("filename") - 1, 1);
505 	zend_declare_typed_property(class_entry, property_filename_name, &property_filename_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
506 	zend_string_release(property_filename_name);
507 
508 	zval property_comment_default_value;
509 	ZVAL_UNDEF(&property_comment_default_value);
510 	zend_string *property_comment_name = zend_string_init("comment", sizeof("comment") - 1, 1);
511 	zend_declare_typed_property(class_entry, property_comment_name, &property_comment_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
512 	zend_string_release(property_comment_name);
513 
514 	return class_entry;
515 }
516