xref: /php-src/ext/standard/dir_arginfo.h (revision 5bb03158)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 4b0f093770ff9a6cad9db033e0b62b412408b937 */
3 
4 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Directory_close, 0, 0, IS_VOID, 0)
5 ZEND_END_ARG_INFO()
6 
7 #define arginfo_class_Directory_rewind arginfo_class_Directory_close
8 
9 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Directory_read, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
10 ZEND_END_ARG_INFO()
11 
12 ZEND_FUNCTION(closedir);
13 ZEND_FUNCTION(rewinddir);
14 ZEND_FUNCTION(readdir);
15 
16 static const zend_function_entry class_Directory_methods[] = {
17 	ZEND_RAW_FENTRY("close", zif_closedir, arginfo_class_Directory_close, ZEND_ACC_PUBLIC, NULL, NULL)
18 	ZEND_RAW_FENTRY("rewind", zif_rewinddir, arginfo_class_Directory_rewind, ZEND_ACC_PUBLIC, NULL, NULL)
19 	ZEND_RAW_FENTRY("read", zif_readdir, arginfo_class_Directory_read, ZEND_ACC_PUBLIC, NULL, NULL)
20 	ZEND_FE_END
21 };
22 
register_dir_symbols(int module_number)23 static void register_dir_symbols(int module_number)
24 {
25 	REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", dirsep_str, CONST_PERSISTENT);
26 	REGISTER_STRING_CONSTANT("PATH_SEPARATOR", pathsep_str, CONST_PERSISTENT);
27 #if defined(HAVE_GLOB) && (defined(GLOB_BRACE) && GLOB_BRACE != 0)
28 	REGISTER_LONG_CONSTANT("GLOB_BRACE", GLOB_BRACE, CONST_PERSISTENT);
29 #endif
30 #if defined(HAVE_GLOB) && (defined(GLOB_ERR) && GLOB_ERR != 0)
31 	REGISTER_LONG_CONSTANT("GLOB_ERR", GLOB_ERR, CONST_PERSISTENT);
32 #endif
33 #if defined(HAVE_GLOB) && (defined(GLOB_MARK) && GLOB_MARK != 0)
34 	REGISTER_LONG_CONSTANT("GLOB_MARK", GLOB_MARK, CONST_PERSISTENT);
35 #endif
36 #if defined(HAVE_GLOB) && (defined(GLOB_NOCHECK) && GLOB_NOCHECK != 0)
37 	REGISTER_LONG_CONSTANT("GLOB_NOCHECK", GLOB_NOCHECK, CONST_PERSISTENT);
38 #endif
39 #if defined(HAVE_GLOB) && (defined(GLOB_NOESCAPE) && GLOB_NOESCAPE != 0)
40 	REGISTER_LONG_CONSTANT("GLOB_NOESCAPE", GLOB_NOESCAPE, CONST_PERSISTENT);
41 #endif
42 #if defined(HAVE_GLOB) && (defined(GLOB_NOSORT) && GLOB_NOSORT != 0)
43 	REGISTER_LONG_CONSTANT("GLOB_NOSORT", GLOB_NOSORT, CONST_PERSISTENT);
44 #endif
45 #if defined(HAVE_GLOB) && defined(GLOB_ONLYDIR)
46 	REGISTER_LONG_CONSTANT("GLOB_ONLYDIR", GLOB_ONLYDIR, CONST_PERSISTENT);
47 #endif
48 #if defined(HAVE_GLOB) && defined(GLOB_AVAILABLE_FLAGS)
49 	REGISTER_LONG_CONSTANT("GLOB_AVAILABLE_FLAGS", GLOB_AVAILABLE_FLAGS, CONST_PERSISTENT);
50 #endif
51 	REGISTER_LONG_CONSTANT("SCANDIR_SORT_ASCENDING", PHP_SCANDIR_SORT_ASCENDING, CONST_PERSISTENT);
52 	REGISTER_LONG_CONSTANT("SCANDIR_SORT_DESCENDING", PHP_SCANDIR_SORT_DESCENDING, CONST_PERSISTENT);
53 	REGISTER_LONG_CONSTANT("SCANDIR_SORT_NONE", PHP_SCANDIR_SORT_NONE, CONST_PERSISTENT);
54 }
55 
register_class_Directory(void)56 static zend_class_entry *register_class_Directory(void)
57 {
58 	zend_class_entry ce, *class_entry;
59 
60 	INIT_CLASS_ENTRY(ce, "Directory", class_Directory_methods);
61 	class_entry = zend_register_internal_class_ex(&ce, NULL);
62 
63 	zval property_path_default_value;
64 	ZVAL_UNDEF(&property_path_default_value);
65 	zend_string *property_path_name = zend_string_init("path", sizeof("path") - 1, 1);
66 	zend_declare_typed_property(class_entry, property_path_name, &property_path_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
67 	zend_string_release(property_path_name);
68 
69 	zval property_handle_default_value;
70 	ZVAL_UNDEF(&property_handle_default_value);
71 	zend_string *property_handle_name = zend_string_init("handle", sizeof("handle") - 1, 1);
72 	zend_declare_typed_property(class_entry, property_handle_name, &property_handle_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
73 	zend_string_release(property_handle_name);
74 
75 	return class_entry;
76 }
77