xref: /php-src/ext/spl/spl_directory_arginfo.h (revision bf5e6c5f)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 06a7809f97dde10e800382fec03a9bb308918bb3 */
3 
4 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo___construct, 0, 0, 1)
5 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
6 ZEND_END_ARG_INFO()
7 
8 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo_getPath, 0, 0, IS_STRING, 0)
9 ZEND_END_ARG_INFO()
10 
11 #define arginfo_class_SplFileInfo_getFilename arginfo_class_SplFileInfo_getPath
12 
13 #define arginfo_class_SplFileInfo_getExtension arginfo_class_SplFileInfo_getPath
14 
15 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo_getBasename, 0, 0, IS_STRING, 0)
16 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, suffix, IS_STRING, 0, "\"\"")
17 ZEND_END_ARG_INFO()
18 
19 #define arginfo_class_SplFileInfo_getPathname arginfo_class_SplFileInfo_getPath
20 
21 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileInfo_getPerms, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
22 ZEND_END_ARG_INFO()
23 
24 #define arginfo_class_SplFileInfo_getInode arginfo_class_SplFileInfo_getPerms
25 
26 #define arginfo_class_SplFileInfo_getSize arginfo_class_SplFileInfo_getPerms
27 
28 #define arginfo_class_SplFileInfo_getOwner arginfo_class_SplFileInfo_getPerms
29 
30 #define arginfo_class_SplFileInfo_getGroup arginfo_class_SplFileInfo_getPerms
31 
32 #define arginfo_class_SplFileInfo_getATime arginfo_class_SplFileInfo_getPerms
33 
34 #define arginfo_class_SplFileInfo_getMTime arginfo_class_SplFileInfo_getPerms
35 
36 #define arginfo_class_SplFileInfo_getCTime arginfo_class_SplFileInfo_getPerms
37 
38 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileInfo_getType, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
39 ZEND_END_ARG_INFO()
40 
41 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo_isWritable, 0, 0, _IS_BOOL, 0)
42 ZEND_END_ARG_INFO()
43 
44 #define arginfo_class_SplFileInfo_isReadable arginfo_class_SplFileInfo_isWritable
45 
46 #define arginfo_class_SplFileInfo_isExecutable arginfo_class_SplFileInfo_isWritable
47 
48 #define arginfo_class_SplFileInfo_isFile arginfo_class_SplFileInfo_isWritable
49 
50 #define arginfo_class_SplFileInfo_isDir arginfo_class_SplFileInfo_isWritable
51 
52 #define arginfo_class_SplFileInfo_isLink arginfo_class_SplFileInfo_isWritable
53 
54 #define arginfo_class_SplFileInfo_getLinkTarget arginfo_class_SplFileInfo_getType
55 
56 #define arginfo_class_SplFileInfo_getRealPath arginfo_class_SplFileInfo_getType
57 
58 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SplFileInfo_getFileInfo, 0, 0, SplFileInfo, 0)
59 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 1, "null")
60 ZEND_END_ARG_INFO()
61 
62 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SplFileInfo_getPathInfo, 0, 0, SplFileInfo, 1)
63 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 1, "null")
64 ZEND_END_ARG_INFO()
65 
66 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SplFileInfo_openFile, 0, 0, SplFileObject, 0)
67 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"r\"")
68 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, useIncludePath, _IS_BOOL, 0, "false")
69 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
70 ZEND_END_ARG_INFO()
71 
72 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo_setFileClass, 0, 0, IS_VOID, 0)
73 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "SplFileObject::class")
74 ZEND_END_ARG_INFO()
75 
76 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo_setInfoClass, 0, 0, IS_VOID, 0)
77 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "SplFileInfo::class")
78 ZEND_END_ARG_INFO()
79 
80 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo___toString, 0, 0, IS_STRING, 0)
81 ZEND_END_ARG_INFO()
82 
83 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo___debugInfo, 0, 0, IS_ARRAY, 0)
84 ZEND_END_ARG_INFO()
85 
86 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SplFileInfo__bad_state_ex, 0, 0, IS_VOID, 0)
87 ZEND_END_ARG_INFO()
88 
89 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DirectoryIterator___construct, 0, 0, 1)
90 	ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
91 ZEND_END_ARG_INFO()
92 
93 #define arginfo_class_DirectoryIterator_getFilename arginfo_class_SplFileInfo_getPath
94 
95 #define arginfo_class_DirectoryIterator_getExtension arginfo_class_SplFileInfo_getPath
96 
97 #define arginfo_class_DirectoryIterator_getBasename arginfo_class_SplFileInfo_getBasename
98 
99 #define arginfo_class_DirectoryIterator_isDot arginfo_class_SplFileInfo_isWritable
100 
101 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DirectoryIterator_rewind, 0, 0, IS_VOID, 0)
102 ZEND_END_ARG_INFO()
103 
104 #define arginfo_class_DirectoryIterator_valid arginfo_class_SplFileInfo_isWritable
105 
106 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DirectoryIterator_key, 0, 0, IS_MIXED, 0)
107 ZEND_END_ARG_INFO()
108 
109 #define arginfo_class_DirectoryIterator_current arginfo_class_DirectoryIterator_key
110 
111 #define arginfo_class_DirectoryIterator_next arginfo_class_DirectoryIterator_rewind
112 
113 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DirectoryIterator_seek, 0, 1, IS_VOID, 0)
114 	ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
115 ZEND_END_ARG_INFO()
116 
117 #define arginfo_class_DirectoryIterator___toString arginfo_class_SplFileInfo___toString
118 
119 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_FilesystemIterator___construct, 0, 0, 1)
120 	ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
121 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS")
122 ZEND_END_ARG_INFO()
123 
124 #define arginfo_class_FilesystemIterator_rewind arginfo_class_DirectoryIterator_rewind
125 
126 #define arginfo_class_FilesystemIterator_key arginfo_class_SplFileInfo_getPath
127 
128 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_FilesystemIterator_current, 0, 0, SplFileInfo|FilesystemIterator, MAY_BE_STRING)
129 ZEND_END_ARG_INFO()
130 
131 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_FilesystemIterator_getFlags, 0, 0, IS_LONG, 0)
132 ZEND_END_ARG_INFO()
133 
134 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_FilesystemIterator_setFlags, 0, 1, IS_VOID, 0)
135 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
136 ZEND_END_ARG_INFO()
137 
138 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RecursiveDirectoryIterator___construct, 0, 0, 1)
139 	ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
140 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO")
141 ZEND_END_ARG_INFO()
142 
143 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RecursiveDirectoryIterator_hasChildren, 0, 0, _IS_BOOL, 0)
144 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, allowLinks, _IS_BOOL, 0, "false")
145 ZEND_END_ARG_INFO()
146 
147 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_RecursiveDirectoryIterator_getChildren, 0, 0, RecursiveDirectoryIterator, 0)
148 ZEND_END_ARG_INFO()
149 
150 #define arginfo_class_RecursiveDirectoryIterator_getSubPath arginfo_class_SplFileInfo_getPath
151 
152 #define arginfo_class_RecursiveDirectoryIterator_getSubPathname arginfo_class_SplFileInfo_getPath
153 
154 #if defined(HAVE_GLOB)
155 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_GlobIterator___construct, 0, 0, 1)
156 	ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
157 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO")
158 ZEND_END_ARG_INFO()
159 
160 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_GlobIterator_count, 0, 0, IS_LONG, 0)
161 ZEND_END_ARG_INFO()
162 #endif
163 
164 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileObject___construct, 0, 0, 1)
165 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
166 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"r\"")
167 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, useIncludePath, _IS_BOOL, 0, "false")
168 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
169 ZEND_END_ARG_INFO()
170 
171 #define arginfo_class_SplFileObject_rewind arginfo_class_DirectoryIterator_rewind
172 
173 #define arginfo_class_SplFileObject_eof arginfo_class_SplFileInfo_isWritable
174 
175 #define arginfo_class_SplFileObject_valid arginfo_class_SplFileInfo_isWritable
176 
177 #define arginfo_class_SplFileObject_fgets arginfo_class_SplFileInfo_getPath
178 
179 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_fread, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
180 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
181 ZEND_END_ARG_INFO()
182 
183 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_fgetcsv, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
184 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"")
185 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"")
186 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"")
187 ZEND_END_ARG_INFO()
188 
189 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_fputcsv, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
190 	ZEND_ARG_TYPE_INFO(0, fields, IS_ARRAY, 0)
191 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"")
192 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"")
193 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"")
194 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, eol, IS_STRING, 0, "\"\\n\"")
195 ZEND_END_ARG_INFO()
196 
197 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_setCsvControl, 0, 0, IS_VOID, 0)
198 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"")
199 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"")
200 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"")
201 ZEND_END_ARG_INFO()
202 
203 #define arginfo_class_SplFileObject_getCsvControl arginfo_class_SplFileInfo___debugInfo
204 
205 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_flock, 0, 1, _IS_BOOL, 0)
206 	ZEND_ARG_TYPE_INFO(0, operation, IS_LONG, 0)
207 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, wouldBlock, "null")
208 ZEND_END_ARG_INFO()
209 
210 #define arginfo_class_SplFileObject_fflush arginfo_class_SplFileInfo_isWritable
211 
212 #define arginfo_class_SplFileObject_ftell arginfo_class_SplFileInfo_getPerms
213 
214 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_fseek, 0, 1, IS_LONG, 0)
215 	ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
216 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_SET")
217 ZEND_END_ARG_INFO()
218 
219 #define arginfo_class_SplFileObject_fgetc arginfo_class_SplFileInfo_getType
220 
221 #define arginfo_class_SplFileObject_fpassthru arginfo_class_FilesystemIterator_getFlags
222 
223 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_fscanf, 0, 1, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_NULL)
224 	ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
225 	ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0)
226 ZEND_END_ARG_INFO()
227 
228 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_fwrite, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
229 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
230 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
231 ZEND_END_ARG_INFO()
232 
233 #define arginfo_class_SplFileObject_fstat arginfo_class_SplFileInfo___debugInfo
234 
235 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_ftruncate, 0, 1, _IS_BOOL, 0)
236 	ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
237 ZEND_END_ARG_INFO()
238 
239 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SplFileObject_current, 0, 0, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE)
240 ZEND_END_ARG_INFO()
241 
242 #define arginfo_class_SplFileObject_key arginfo_class_FilesystemIterator_getFlags
243 
244 #define arginfo_class_SplFileObject_next arginfo_class_DirectoryIterator_rewind
245 
246 #define arginfo_class_SplFileObject_setFlags arginfo_class_FilesystemIterator_setFlags
247 
248 #define arginfo_class_SplFileObject_getFlags arginfo_class_FilesystemIterator_getFlags
249 
250 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_setMaxLineLen, 0, 1, IS_VOID, 0)
251 	ZEND_ARG_TYPE_INFO(0, maxLength, IS_LONG, 0)
252 ZEND_END_ARG_INFO()
253 
254 #define arginfo_class_SplFileObject_getMaxLineLen arginfo_class_FilesystemIterator_getFlags
255 
256 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_hasChildren, 0, 0, IS_FALSE, 0)
257 ZEND_END_ARG_INFO()
258 
259 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_getChildren, 0, 0, IS_NULL, 1)
260 ZEND_END_ARG_INFO()
261 
262 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SplFileObject_seek, 0, 1, IS_VOID, 0)
263 	ZEND_ARG_TYPE_INFO(0, line, IS_LONG, 0)
264 ZEND_END_ARG_INFO()
265 
266 #define arginfo_class_SplFileObject_getCurrentLine arginfo_class_SplFileInfo_getPath
267 
268 #define arginfo_class_SplFileObject___toString arginfo_class_SplFileInfo___toString
269 
270 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplTempFileObject___construct, 0, 0, 0)
271 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxMemory, IS_LONG, 0, "2 * 1024 * 1024")
272 ZEND_END_ARG_INFO()
273 
274 ZEND_METHOD(SplFileInfo, __construct);
275 ZEND_METHOD(SplFileInfo, getPath);
276 ZEND_METHOD(SplFileInfo, getFilename);
277 ZEND_METHOD(SplFileInfo, getExtension);
278 ZEND_METHOD(SplFileInfo, getBasename);
279 ZEND_METHOD(SplFileInfo, getPathname);
280 ZEND_METHOD(SplFileInfo, getPerms);
281 ZEND_METHOD(SplFileInfo, getInode);
282 ZEND_METHOD(SplFileInfo, getSize);
283 ZEND_METHOD(SplFileInfo, getOwner);
284 ZEND_METHOD(SplFileInfo, getGroup);
285 ZEND_METHOD(SplFileInfo, getATime);
286 ZEND_METHOD(SplFileInfo, getMTime);
287 ZEND_METHOD(SplFileInfo, getCTime);
288 ZEND_METHOD(SplFileInfo, getType);
289 ZEND_METHOD(SplFileInfo, isWritable);
290 ZEND_METHOD(SplFileInfo, isReadable);
291 ZEND_METHOD(SplFileInfo, isExecutable);
292 ZEND_METHOD(SplFileInfo, isFile);
293 ZEND_METHOD(SplFileInfo, isDir);
294 ZEND_METHOD(SplFileInfo, isLink);
295 ZEND_METHOD(SplFileInfo, getLinkTarget);
296 ZEND_METHOD(SplFileInfo, getRealPath);
297 ZEND_METHOD(SplFileInfo, getFileInfo);
298 ZEND_METHOD(SplFileInfo, getPathInfo);
299 ZEND_METHOD(SplFileInfo, openFile);
300 ZEND_METHOD(SplFileInfo, setFileClass);
301 ZEND_METHOD(SplFileInfo, setInfoClass);
302 ZEND_METHOD(SplFileInfo, __debugInfo);
303 ZEND_METHOD(SplFileInfo, _bad_state_ex);
304 ZEND_METHOD(DirectoryIterator, __construct);
305 ZEND_METHOD(DirectoryIterator, getFilename);
306 ZEND_METHOD(DirectoryIterator, getExtension);
307 ZEND_METHOD(DirectoryIterator, getBasename);
308 ZEND_METHOD(DirectoryIterator, isDot);
309 ZEND_METHOD(DirectoryIterator, rewind);
310 ZEND_METHOD(DirectoryIterator, valid);
311 ZEND_METHOD(DirectoryIterator, key);
312 ZEND_METHOD(DirectoryIterator, current);
313 ZEND_METHOD(DirectoryIterator, next);
314 ZEND_METHOD(DirectoryIterator, seek);
315 ZEND_METHOD(FilesystemIterator, __construct);
316 ZEND_METHOD(FilesystemIterator, rewind);
317 ZEND_METHOD(FilesystemIterator, key);
318 ZEND_METHOD(FilesystemIterator, current);
319 ZEND_METHOD(FilesystemIterator, getFlags);
320 ZEND_METHOD(FilesystemIterator, setFlags);
321 ZEND_METHOD(RecursiveDirectoryIterator, __construct);
322 ZEND_METHOD(RecursiveDirectoryIterator, hasChildren);
323 ZEND_METHOD(RecursiveDirectoryIterator, getChildren);
324 ZEND_METHOD(RecursiveDirectoryIterator, getSubPath);
325 ZEND_METHOD(RecursiveDirectoryIterator, getSubPathname);
326 #if defined(HAVE_GLOB)
327 ZEND_METHOD(GlobIterator, __construct);
328 ZEND_METHOD(GlobIterator, count);
329 #endif
330 ZEND_METHOD(SplFileObject, __construct);
331 ZEND_METHOD(SplFileObject, rewind);
332 ZEND_METHOD(SplFileObject, eof);
333 ZEND_METHOD(SplFileObject, valid);
334 ZEND_METHOD(SplFileObject, fgets);
335 ZEND_METHOD(SplFileObject, fread);
336 ZEND_METHOD(SplFileObject, fgetcsv);
337 ZEND_METHOD(SplFileObject, fputcsv);
338 ZEND_METHOD(SplFileObject, setCsvControl);
339 ZEND_METHOD(SplFileObject, getCsvControl);
340 ZEND_METHOD(SplFileObject, flock);
341 ZEND_METHOD(SplFileObject, fflush);
342 ZEND_METHOD(SplFileObject, ftell);
343 ZEND_METHOD(SplFileObject, fseek);
344 ZEND_METHOD(SplFileObject, fgetc);
345 ZEND_METHOD(SplFileObject, fpassthru);
346 ZEND_METHOD(SplFileObject, fscanf);
347 ZEND_METHOD(SplFileObject, fwrite);
348 ZEND_METHOD(SplFileObject, fstat);
349 ZEND_METHOD(SplFileObject, ftruncate);
350 ZEND_METHOD(SplFileObject, current);
351 ZEND_METHOD(SplFileObject, key);
352 ZEND_METHOD(SplFileObject, next);
353 ZEND_METHOD(SplFileObject, setFlags);
354 ZEND_METHOD(SplFileObject, getFlags);
355 ZEND_METHOD(SplFileObject, setMaxLineLen);
356 ZEND_METHOD(SplFileObject, getMaxLineLen);
357 ZEND_METHOD(SplFileObject, hasChildren);
358 ZEND_METHOD(SplFileObject, getChildren);
359 ZEND_METHOD(SplFileObject, seek);
360 ZEND_METHOD(SplFileObject, __toString);
361 ZEND_METHOD(SplTempFileObject, __construct);
362 
363 static const zend_function_entry class_SplFileInfo_methods[] = {
364 	ZEND_ME(SplFileInfo, __construct, arginfo_class_SplFileInfo___construct, ZEND_ACC_PUBLIC)
365 	ZEND_ME(SplFileInfo, getPath, arginfo_class_SplFileInfo_getPath, ZEND_ACC_PUBLIC)
366 	ZEND_ME(SplFileInfo, getFilename, arginfo_class_SplFileInfo_getFilename, ZEND_ACC_PUBLIC)
367 	ZEND_ME(SplFileInfo, getExtension, arginfo_class_SplFileInfo_getExtension, ZEND_ACC_PUBLIC)
368 	ZEND_ME(SplFileInfo, getBasename, arginfo_class_SplFileInfo_getBasename, ZEND_ACC_PUBLIC)
369 	ZEND_ME(SplFileInfo, getPathname, arginfo_class_SplFileInfo_getPathname, ZEND_ACC_PUBLIC)
370 	ZEND_ME(SplFileInfo, getPerms, arginfo_class_SplFileInfo_getPerms, ZEND_ACC_PUBLIC)
371 	ZEND_ME(SplFileInfo, getInode, arginfo_class_SplFileInfo_getInode, ZEND_ACC_PUBLIC)
372 	ZEND_ME(SplFileInfo, getSize, arginfo_class_SplFileInfo_getSize, ZEND_ACC_PUBLIC)
373 	ZEND_ME(SplFileInfo, getOwner, arginfo_class_SplFileInfo_getOwner, ZEND_ACC_PUBLIC)
374 	ZEND_ME(SplFileInfo, getGroup, arginfo_class_SplFileInfo_getGroup, ZEND_ACC_PUBLIC)
375 	ZEND_ME(SplFileInfo, getATime, arginfo_class_SplFileInfo_getATime, ZEND_ACC_PUBLIC)
376 	ZEND_ME(SplFileInfo, getMTime, arginfo_class_SplFileInfo_getMTime, ZEND_ACC_PUBLIC)
377 	ZEND_ME(SplFileInfo, getCTime, arginfo_class_SplFileInfo_getCTime, ZEND_ACC_PUBLIC)
378 	ZEND_ME(SplFileInfo, getType, arginfo_class_SplFileInfo_getType, ZEND_ACC_PUBLIC)
379 	ZEND_ME(SplFileInfo, isWritable, arginfo_class_SplFileInfo_isWritable, ZEND_ACC_PUBLIC)
380 	ZEND_ME(SplFileInfo, isReadable, arginfo_class_SplFileInfo_isReadable, ZEND_ACC_PUBLIC)
381 	ZEND_ME(SplFileInfo, isExecutable, arginfo_class_SplFileInfo_isExecutable, ZEND_ACC_PUBLIC)
382 	ZEND_ME(SplFileInfo, isFile, arginfo_class_SplFileInfo_isFile, ZEND_ACC_PUBLIC)
383 	ZEND_ME(SplFileInfo, isDir, arginfo_class_SplFileInfo_isDir, ZEND_ACC_PUBLIC)
384 	ZEND_ME(SplFileInfo, isLink, arginfo_class_SplFileInfo_isLink, ZEND_ACC_PUBLIC)
385 	ZEND_ME(SplFileInfo, getLinkTarget, arginfo_class_SplFileInfo_getLinkTarget, ZEND_ACC_PUBLIC)
386 	ZEND_ME(SplFileInfo, getRealPath, arginfo_class_SplFileInfo_getRealPath, ZEND_ACC_PUBLIC)
387 	ZEND_ME(SplFileInfo, getFileInfo, arginfo_class_SplFileInfo_getFileInfo, ZEND_ACC_PUBLIC)
388 	ZEND_ME(SplFileInfo, getPathInfo, arginfo_class_SplFileInfo_getPathInfo, ZEND_ACC_PUBLIC)
389 	ZEND_ME(SplFileInfo, openFile, arginfo_class_SplFileInfo_openFile, ZEND_ACC_PUBLIC)
390 	ZEND_ME(SplFileInfo, setFileClass, arginfo_class_SplFileInfo_setFileClass, ZEND_ACC_PUBLIC)
391 	ZEND_ME(SplFileInfo, setInfoClass, arginfo_class_SplFileInfo_setInfoClass, ZEND_ACC_PUBLIC)
392 	ZEND_RAW_FENTRY("__toString", zim_SplFileInfo_getPathname, arginfo_class_SplFileInfo___toString, ZEND_ACC_PUBLIC, NULL, NULL)
393 	ZEND_ME(SplFileInfo, __debugInfo, arginfo_class_SplFileInfo___debugInfo, ZEND_ACC_PUBLIC)
394 	ZEND_ME(SplFileInfo, _bad_state_ex, arginfo_class_SplFileInfo__bad_state_ex, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL|ZEND_ACC_DEPRECATED)
395 	ZEND_FE_END
396 };
397 
398 static const zend_function_entry class_DirectoryIterator_methods[] = {
399 	ZEND_ME(DirectoryIterator, __construct, arginfo_class_DirectoryIterator___construct, ZEND_ACC_PUBLIC)
400 	ZEND_ME(DirectoryIterator, getFilename, arginfo_class_DirectoryIterator_getFilename, ZEND_ACC_PUBLIC)
401 	ZEND_ME(DirectoryIterator, getExtension, arginfo_class_DirectoryIterator_getExtension, ZEND_ACC_PUBLIC)
402 	ZEND_ME(DirectoryIterator, getBasename, arginfo_class_DirectoryIterator_getBasename, ZEND_ACC_PUBLIC)
403 	ZEND_ME(DirectoryIterator, isDot, arginfo_class_DirectoryIterator_isDot, ZEND_ACC_PUBLIC)
404 	ZEND_ME(DirectoryIterator, rewind, arginfo_class_DirectoryIterator_rewind, ZEND_ACC_PUBLIC)
405 	ZEND_ME(DirectoryIterator, valid, arginfo_class_DirectoryIterator_valid, ZEND_ACC_PUBLIC)
406 	ZEND_ME(DirectoryIterator, key, arginfo_class_DirectoryIterator_key, ZEND_ACC_PUBLIC)
407 	ZEND_ME(DirectoryIterator, current, arginfo_class_DirectoryIterator_current, ZEND_ACC_PUBLIC)
408 	ZEND_ME(DirectoryIterator, next, arginfo_class_DirectoryIterator_next, ZEND_ACC_PUBLIC)
409 	ZEND_ME(DirectoryIterator, seek, arginfo_class_DirectoryIterator_seek, ZEND_ACC_PUBLIC)
410 	ZEND_RAW_FENTRY("__toString", zim_DirectoryIterator_getFilename, arginfo_class_DirectoryIterator___toString, ZEND_ACC_PUBLIC, NULL, NULL)
411 	ZEND_FE_END
412 };
413 
414 static const zend_function_entry class_FilesystemIterator_methods[] = {
415 	ZEND_ME(FilesystemIterator, __construct, arginfo_class_FilesystemIterator___construct, ZEND_ACC_PUBLIC)
416 	ZEND_ME(FilesystemIterator, rewind, arginfo_class_FilesystemIterator_rewind, ZEND_ACC_PUBLIC)
417 	ZEND_ME(FilesystemIterator, key, arginfo_class_FilesystemIterator_key, ZEND_ACC_PUBLIC)
418 	ZEND_ME(FilesystemIterator, current, arginfo_class_FilesystemIterator_current, ZEND_ACC_PUBLIC)
419 	ZEND_ME(FilesystemIterator, getFlags, arginfo_class_FilesystemIterator_getFlags, ZEND_ACC_PUBLIC)
420 	ZEND_ME(FilesystemIterator, setFlags, arginfo_class_FilesystemIterator_setFlags, ZEND_ACC_PUBLIC)
421 	ZEND_FE_END
422 };
423 
424 static const zend_function_entry class_RecursiveDirectoryIterator_methods[] = {
425 	ZEND_ME(RecursiveDirectoryIterator, __construct, arginfo_class_RecursiveDirectoryIterator___construct, ZEND_ACC_PUBLIC)
426 	ZEND_ME(RecursiveDirectoryIterator, hasChildren, arginfo_class_RecursiveDirectoryIterator_hasChildren, ZEND_ACC_PUBLIC)
427 	ZEND_ME(RecursiveDirectoryIterator, getChildren, arginfo_class_RecursiveDirectoryIterator_getChildren, ZEND_ACC_PUBLIC)
428 	ZEND_ME(RecursiveDirectoryIterator, getSubPath, arginfo_class_RecursiveDirectoryIterator_getSubPath, ZEND_ACC_PUBLIC)
429 	ZEND_ME(RecursiveDirectoryIterator, getSubPathname, arginfo_class_RecursiveDirectoryIterator_getSubPathname, ZEND_ACC_PUBLIC)
430 	ZEND_FE_END
431 };
432 
433 #if defined(HAVE_GLOB)
434 static const zend_function_entry class_GlobIterator_methods[] = {
435 	ZEND_ME(GlobIterator, __construct, arginfo_class_GlobIterator___construct, ZEND_ACC_PUBLIC)
436 	ZEND_ME(GlobIterator, count, arginfo_class_GlobIterator_count, ZEND_ACC_PUBLIC)
437 	ZEND_FE_END
438 };
439 #endif
440 
441 static const zend_function_entry class_SplFileObject_methods[] = {
442 	ZEND_ME(SplFileObject, __construct, arginfo_class_SplFileObject___construct, ZEND_ACC_PUBLIC)
443 	ZEND_ME(SplFileObject, rewind, arginfo_class_SplFileObject_rewind, ZEND_ACC_PUBLIC)
444 	ZEND_ME(SplFileObject, eof, arginfo_class_SplFileObject_eof, ZEND_ACC_PUBLIC)
445 	ZEND_ME(SplFileObject, valid, arginfo_class_SplFileObject_valid, ZEND_ACC_PUBLIC)
446 	ZEND_ME(SplFileObject, fgets, arginfo_class_SplFileObject_fgets, ZEND_ACC_PUBLIC)
447 	ZEND_ME(SplFileObject, fread, arginfo_class_SplFileObject_fread, ZEND_ACC_PUBLIC)
448 	ZEND_ME(SplFileObject, fgetcsv, arginfo_class_SplFileObject_fgetcsv, ZEND_ACC_PUBLIC)
449 	ZEND_ME(SplFileObject, fputcsv, arginfo_class_SplFileObject_fputcsv, ZEND_ACC_PUBLIC)
450 	ZEND_ME(SplFileObject, setCsvControl, arginfo_class_SplFileObject_setCsvControl, ZEND_ACC_PUBLIC)
451 	ZEND_ME(SplFileObject, getCsvControl, arginfo_class_SplFileObject_getCsvControl, ZEND_ACC_PUBLIC)
452 	ZEND_ME(SplFileObject, flock, arginfo_class_SplFileObject_flock, ZEND_ACC_PUBLIC)
453 	ZEND_ME(SplFileObject, fflush, arginfo_class_SplFileObject_fflush, ZEND_ACC_PUBLIC)
454 	ZEND_ME(SplFileObject, ftell, arginfo_class_SplFileObject_ftell, ZEND_ACC_PUBLIC)
455 	ZEND_ME(SplFileObject, fseek, arginfo_class_SplFileObject_fseek, ZEND_ACC_PUBLIC)
456 	ZEND_ME(SplFileObject, fgetc, arginfo_class_SplFileObject_fgetc, ZEND_ACC_PUBLIC)
457 	ZEND_ME(SplFileObject, fpassthru, arginfo_class_SplFileObject_fpassthru, ZEND_ACC_PUBLIC)
458 	ZEND_ME(SplFileObject, fscanf, arginfo_class_SplFileObject_fscanf, ZEND_ACC_PUBLIC)
459 	ZEND_ME(SplFileObject, fwrite, arginfo_class_SplFileObject_fwrite, ZEND_ACC_PUBLIC)
460 	ZEND_ME(SplFileObject, fstat, arginfo_class_SplFileObject_fstat, ZEND_ACC_PUBLIC)
461 	ZEND_ME(SplFileObject, ftruncate, arginfo_class_SplFileObject_ftruncate, ZEND_ACC_PUBLIC)
462 	ZEND_ME(SplFileObject, current, arginfo_class_SplFileObject_current, ZEND_ACC_PUBLIC)
463 	ZEND_ME(SplFileObject, key, arginfo_class_SplFileObject_key, ZEND_ACC_PUBLIC)
464 	ZEND_ME(SplFileObject, next, arginfo_class_SplFileObject_next, ZEND_ACC_PUBLIC)
465 	ZEND_ME(SplFileObject, setFlags, arginfo_class_SplFileObject_setFlags, ZEND_ACC_PUBLIC)
466 	ZEND_ME(SplFileObject, getFlags, arginfo_class_SplFileObject_getFlags, ZEND_ACC_PUBLIC)
467 	ZEND_ME(SplFileObject, setMaxLineLen, arginfo_class_SplFileObject_setMaxLineLen, ZEND_ACC_PUBLIC)
468 	ZEND_ME(SplFileObject, getMaxLineLen, arginfo_class_SplFileObject_getMaxLineLen, ZEND_ACC_PUBLIC)
469 	ZEND_ME(SplFileObject, hasChildren, arginfo_class_SplFileObject_hasChildren, ZEND_ACC_PUBLIC)
470 	ZEND_ME(SplFileObject, getChildren, arginfo_class_SplFileObject_getChildren, ZEND_ACC_PUBLIC)
471 	ZEND_ME(SplFileObject, seek, arginfo_class_SplFileObject_seek, ZEND_ACC_PUBLIC)
472 	ZEND_RAW_FENTRY("getCurrentLine", zim_SplFileObject_fgets, arginfo_class_SplFileObject_getCurrentLine, ZEND_ACC_PUBLIC, NULL, NULL)
473 	ZEND_ME(SplFileObject, __toString, arginfo_class_SplFileObject___toString, ZEND_ACC_PUBLIC)
474 	ZEND_FE_END
475 };
476 
477 static const zend_function_entry class_SplTempFileObject_methods[] = {
478 	ZEND_ME(SplTempFileObject, __construct, arginfo_class_SplTempFileObject___construct, ZEND_ACC_PUBLIC)
479 	ZEND_FE_END
480 };
481 
register_class_SplFileInfo(zend_class_entry * class_entry_Stringable)482 static zend_class_entry *register_class_SplFileInfo(zend_class_entry *class_entry_Stringable)
483 {
484 	zend_class_entry ce, *class_entry;
485 
486 	INIT_CLASS_ENTRY(ce, "SplFileInfo", class_SplFileInfo_methods);
487 	class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_NOT_SERIALIZABLE);
488 	zend_class_implements(class_entry, 1, class_entry_Stringable);
489 
490 
491 	zend_attribute *attribute_Deprecated_func__bad_state_ex_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "_bad_state_ex", sizeof("_bad_state_ex") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
492 	zval attribute_Deprecated_func__bad_state_ex_0_arg0;
493 	zend_string *attribute_Deprecated_func__bad_state_ex_0_arg0_str = zend_string_init("8.2", strlen("8.2"), 1);
494 	ZVAL_STR(&attribute_Deprecated_func__bad_state_ex_0_arg0, attribute_Deprecated_func__bad_state_ex_0_arg0_str);
495 	ZVAL_COPY_VALUE(&attribute_Deprecated_func__bad_state_ex_0->args[0].value, &attribute_Deprecated_func__bad_state_ex_0_arg0);
496 	attribute_Deprecated_func__bad_state_ex_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
497 
498 	return class_entry;
499 }
500 
register_class_DirectoryIterator(zend_class_entry * class_entry_SplFileInfo,zend_class_entry * class_entry_SeekableIterator)501 static zend_class_entry *register_class_DirectoryIterator(zend_class_entry *class_entry_SplFileInfo, zend_class_entry *class_entry_SeekableIterator)
502 {
503 	zend_class_entry ce, *class_entry;
504 
505 	INIT_CLASS_ENTRY(ce, "DirectoryIterator", class_DirectoryIterator_methods);
506 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_SplFileInfo, 0);
507 	zend_class_implements(class_entry, 1, class_entry_SeekableIterator);
508 
509 	return class_entry;
510 }
511 
register_class_FilesystemIterator(zend_class_entry * class_entry_DirectoryIterator)512 static zend_class_entry *register_class_FilesystemIterator(zend_class_entry *class_entry_DirectoryIterator)
513 {
514 	zend_class_entry ce, *class_entry;
515 
516 	INIT_CLASS_ENTRY(ce, "FilesystemIterator", class_FilesystemIterator_methods);
517 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_DirectoryIterator, 0);
518 
519 	zval const_CURRENT_MODE_MASK_value;
520 	ZVAL_LONG(&const_CURRENT_MODE_MASK_value, SPL_FILE_DIR_CURRENT_MODE_MASK);
521 	zend_string *const_CURRENT_MODE_MASK_name = zend_string_init_interned("CURRENT_MODE_MASK", sizeof("CURRENT_MODE_MASK") - 1, 1);
522 	zend_declare_typed_class_constant(class_entry, const_CURRENT_MODE_MASK_name, &const_CURRENT_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
523 	zend_string_release(const_CURRENT_MODE_MASK_name);
524 
525 	zval const_CURRENT_AS_PATHNAME_value;
526 	ZVAL_LONG(&const_CURRENT_AS_PATHNAME_value, SPL_FILE_DIR_CURRENT_AS_PATHNAME);
527 	zend_string *const_CURRENT_AS_PATHNAME_name = zend_string_init_interned("CURRENT_AS_PATHNAME", sizeof("CURRENT_AS_PATHNAME") - 1, 1);
528 	zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_PATHNAME_name, &const_CURRENT_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
529 	zend_string_release(const_CURRENT_AS_PATHNAME_name);
530 
531 	zval const_CURRENT_AS_FILEINFO_value;
532 	ZVAL_LONG(&const_CURRENT_AS_FILEINFO_value, SPL_FILE_DIR_CURRENT_AS_FILEINFO);
533 	zend_string *const_CURRENT_AS_FILEINFO_name = zend_string_init_interned("CURRENT_AS_FILEINFO", sizeof("CURRENT_AS_FILEINFO") - 1, 1);
534 	zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_FILEINFO_name, &const_CURRENT_AS_FILEINFO_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
535 	zend_string_release(const_CURRENT_AS_FILEINFO_name);
536 
537 	zval const_CURRENT_AS_SELF_value;
538 	ZVAL_LONG(&const_CURRENT_AS_SELF_value, SPL_FILE_DIR_CURRENT_AS_SELF);
539 	zend_string *const_CURRENT_AS_SELF_name = zend_string_init_interned("CURRENT_AS_SELF", sizeof("CURRENT_AS_SELF") - 1, 1);
540 	zend_declare_typed_class_constant(class_entry, const_CURRENT_AS_SELF_name, &const_CURRENT_AS_SELF_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
541 	zend_string_release(const_CURRENT_AS_SELF_name);
542 
543 	zval const_KEY_MODE_MASK_value;
544 	ZVAL_LONG(&const_KEY_MODE_MASK_value, SPL_FILE_DIR_KEY_MODE_MASK);
545 	zend_string *const_KEY_MODE_MASK_name = zend_string_init_interned("KEY_MODE_MASK", sizeof("KEY_MODE_MASK") - 1, 1);
546 	zend_declare_typed_class_constant(class_entry, const_KEY_MODE_MASK_name, &const_KEY_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
547 	zend_string_release(const_KEY_MODE_MASK_name);
548 
549 	zval const_KEY_AS_PATHNAME_value;
550 	ZVAL_LONG(&const_KEY_AS_PATHNAME_value, SPL_FILE_DIR_KEY_AS_PATHNAME);
551 	zend_string *const_KEY_AS_PATHNAME_name = zend_string_init_interned("KEY_AS_PATHNAME", sizeof("KEY_AS_PATHNAME") - 1, 1);
552 	zend_declare_typed_class_constant(class_entry, const_KEY_AS_PATHNAME_name, &const_KEY_AS_PATHNAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
553 	zend_string_release(const_KEY_AS_PATHNAME_name);
554 
555 	zval const_FOLLOW_SYMLINKS_value;
556 	ZVAL_LONG(&const_FOLLOW_SYMLINKS_value, SPL_FILE_DIR_FOLLOW_SYMLINKS);
557 	zend_string *const_FOLLOW_SYMLINKS_name = zend_string_init_interned("FOLLOW_SYMLINKS", sizeof("FOLLOW_SYMLINKS") - 1, 1);
558 	zend_declare_typed_class_constant(class_entry, const_FOLLOW_SYMLINKS_name, &const_FOLLOW_SYMLINKS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
559 	zend_string_release(const_FOLLOW_SYMLINKS_name);
560 
561 	zval const_KEY_AS_FILENAME_value;
562 	ZVAL_LONG(&const_KEY_AS_FILENAME_value, SPL_FILE_DIR_KEY_AS_FILENAME);
563 	zend_string *const_KEY_AS_FILENAME_name = zend_string_init_interned("KEY_AS_FILENAME", sizeof("KEY_AS_FILENAME") - 1, 1);
564 	zend_declare_typed_class_constant(class_entry, const_KEY_AS_FILENAME_name, &const_KEY_AS_FILENAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
565 	zend_string_release(const_KEY_AS_FILENAME_name);
566 
567 	zval const_NEW_CURRENT_AND_KEY_value;
568 	ZVAL_LONG(&const_NEW_CURRENT_AND_KEY_value, SPL_FILE_NEW_CURRENT_AND_KEY);
569 	zend_string *const_NEW_CURRENT_AND_KEY_name = zend_string_init_interned("NEW_CURRENT_AND_KEY", sizeof("NEW_CURRENT_AND_KEY") - 1, 1);
570 	zend_declare_typed_class_constant(class_entry, const_NEW_CURRENT_AND_KEY_name, &const_NEW_CURRENT_AND_KEY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
571 	zend_string_release(const_NEW_CURRENT_AND_KEY_name);
572 
573 	zval const_OTHER_MODE_MASK_value;
574 	ZVAL_LONG(&const_OTHER_MODE_MASK_value, SPL_FILE_DIR_OTHERS_MASK);
575 	zend_string *const_OTHER_MODE_MASK_name = zend_string_init_interned("OTHER_MODE_MASK", sizeof("OTHER_MODE_MASK") - 1, 1);
576 	zend_declare_typed_class_constant(class_entry, const_OTHER_MODE_MASK_name, &const_OTHER_MODE_MASK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
577 	zend_string_release(const_OTHER_MODE_MASK_name);
578 
579 	zval const_SKIP_DOTS_value;
580 	ZVAL_LONG(&const_SKIP_DOTS_value, SPL_FILE_DIR_SKIPDOTS);
581 	zend_string *const_SKIP_DOTS_name = zend_string_init_interned("SKIP_DOTS", sizeof("SKIP_DOTS") - 1, 1);
582 	zend_declare_typed_class_constant(class_entry, const_SKIP_DOTS_name, &const_SKIP_DOTS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
583 	zend_string_release(const_SKIP_DOTS_name);
584 
585 	zval const_UNIX_PATHS_value;
586 	ZVAL_LONG(&const_UNIX_PATHS_value, SPL_FILE_DIR_UNIXPATHS);
587 	zend_string *const_UNIX_PATHS_name = zend_string_init_interned("UNIX_PATHS", sizeof("UNIX_PATHS") - 1, 1);
588 	zend_declare_typed_class_constant(class_entry, const_UNIX_PATHS_name, &const_UNIX_PATHS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
589 	zend_string_release(const_UNIX_PATHS_name);
590 
591 	return class_entry;
592 }
593 
register_class_RecursiveDirectoryIterator(zend_class_entry * class_entry_FilesystemIterator,zend_class_entry * class_entry_RecursiveIterator)594 static zend_class_entry *register_class_RecursiveDirectoryIterator(zend_class_entry *class_entry_FilesystemIterator, zend_class_entry *class_entry_RecursiveIterator)
595 {
596 	zend_class_entry ce, *class_entry;
597 
598 	INIT_CLASS_ENTRY(ce, "RecursiveDirectoryIterator", class_RecursiveDirectoryIterator_methods);
599 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_FilesystemIterator, 0);
600 	zend_class_implements(class_entry, 1, class_entry_RecursiveIterator);
601 
602 	return class_entry;
603 }
604 
605 #if defined(HAVE_GLOB)
register_class_GlobIterator(zend_class_entry * class_entry_FilesystemIterator,zend_class_entry * class_entry_Countable)606 static zend_class_entry *register_class_GlobIterator(zend_class_entry *class_entry_FilesystemIterator, zend_class_entry *class_entry_Countable)
607 {
608 	zend_class_entry ce, *class_entry;
609 
610 	INIT_CLASS_ENTRY(ce, "GlobIterator", class_GlobIterator_methods);
611 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_FilesystemIterator, 0);
612 	zend_class_implements(class_entry, 1, class_entry_Countable);
613 
614 	return class_entry;
615 }
616 #endif
617 
register_class_SplFileObject(zend_class_entry * class_entry_SplFileInfo,zend_class_entry * class_entry_RecursiveIterator,zend_class_entry * class_entry_SeekableIterator)618 static zend_class_entry *register_class_SplFileObject(zend_class_entry *class_entry_SplFileInfo, zend_class_entry *class_entry_RecursiveIterator, zend_class_entry *class_entry_SeekableIterator)
619 {
620 	zend_class_entry ce, *class_entry;
621 
622 	INIT_CLASS_ENTRY(ce, "SplFileObject", class_SplFileObject_methods);
623 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_SplFileInfo, 0);
624 	zend_class_implements(class_entry, 2, class_entry_RecursiveIterator, class_entry_SeekableIterator);
625 
626 	zval const_DROP_NEW_LINE_value;
627 	ZVAL_LONG(&const_DROP_NEW_LINE_value, SPL_FILE_OBJECT_DROP_NEW_LINE);
628 	zend_string *const_DROP_NEW_LINE_name = zend_string_init_interned("DROP_NEW_LINE", sizeof("DROP_NEW_LINE") - 1, 1);
629 	zend_declare_typed_class_constant(class_entry, const_DROP_NEW_LINE_name, &const_DROP_NEW_LINE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
630 	zend_string_release(const_DROP_NEW_LINE_name);
631 
632 	zval const_READ_AHEAD_value;
633 	ZVAL_LONG(&const_READ_AHEAD_value, SPL_FILE_OBJECT_READ_AHEAD);
634 	zend_string *const_READ_AHEAD_name = zend_string_init_interned("READ_AHEAD", sizeof("READ_AHEAD") - 1, 1);
635 	zend_declare_typed_class_constant(class_entry, const_READ_AHEAD_name, &const_READ_AHEAD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
636 	zend_string_release(const_READ_AHEAD_name);
637 
638 	zval const_SKIP_EMPTY_value;
639 	ZVAL_LONG(&const_SKIP_EMPTY_value, SPL_FILE_OBJECT_SKIP_EMPTY);
640 	zend_string *const_SKIP_EMPTY_name = zend_string_init_interned("SKIP_EMPTY", sizeof("SKIP_EMPTY") - 1, 1);
641 	zend_declare_typed_class_constant(class_entry, const_SKIP_EMPTY_name, &const_SKIP_EMPTY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
642 	zend_string_release(const_SKIP_EMPTY_name);
643 
644 	zval const_READ_CSV_value;
645 	ZVAL_LONG(&const_READ_CSV_value, SPL_FILE_OBJECT_READ_CSV);
646 	zend_string *const_READ_CSV_name = zend_string_init_interned("READ_CSV", sizeof("READ_CSV") - 1, 1);
647 	zend_declare_typed_class_constant(class_entry, const_READ_CSV_name, &const_READ_CSV_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
648 	zend_string_release(const_READ_CSV_name);
649 
650 	return class_entry;
651 }
652 
register_class_SplTempFileObject(zend_class_entry * class_entry_SplFileObject)653 static zend_class_entry *register_class_SplTempFileObject(zend_class_entry *class_entry_SplFileObject)
654 {
655 	zend_class_entry ce, *class_entry;
656 
657 	INIT_CLASS_ENTRY(ce, "SplTempFileObject", class_SplTempFileObject_methods);
658 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_SplFileObject, 0);
659 
660 	return class_entry;
661 }
662