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