xref: /PHP-8.2/ext/libxml/libxml_arginfo.h (revision 11796229)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 8fa6f4fa2f3eb8db944626b5b3d814f5e3ae04a3 */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_streams_context, 0, 1, IS_VOID, 0)
5 	ZEND_ARG_INFO(0, context)
6 ZEND_END_ARG_INFO()
7 
8 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_use_internal_errors, 0, 0, _IS_BOOL, 0)
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_errors, _IS_BOOL, 1, "null")
10 ZEND_END_ARG_INFO()
11 
12 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_libxml_get_last_error, 0, 0, LibXMLError, MAY_BE_FALSE)
13 ZEND_END_ARG_INFO()
14 
15 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_get_errors, 0, 0, IS_ARRAY, 0)
16 ZEND_END_ARG_INFO()
17 
18 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_clear_errors, 0, 0, IS_VOID, 0)
19 ZEND_END_ARG_INFO()
20 
21 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_disable_entity_loader, 0, 0, _IS_BOOL, 0)
22 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, disable, _IS_BOOL, 0, "true")
23 ZEND_END_ARG_INFO()
24 
25 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_external_entity_loader, 0, 1, _IS_BOOL, 0)
26 	ZEND_ARG_TYPE_INFO(0, resolver_function, IS_CALLABLE, 1)
27 ZEND_END_ARG_INFO()
28 
29 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_get_external_entity_loader, 0, 0, IS_CALLABLE, 1)
30 ZEND_END_ARG_INFO()
31 
32 
33 ZEND_FUNCTION(libxml_set_streams_context);
34 ZEND_FUNCTION(libxml_use_internal_errors);
35 ZEND_FUNCTION(libxml_get_last_error);
36 ZEND_FUNCTION(libxml_get_errors);
37 ZEND_FUNCTION(libxml_clear_errors);
38 ZEND_FUNCTION(libxml_disable_entity_loader);
39 ZEND_FUNCTION(libxml_set_external_entity_loader);
40 ZEND_FUNCTION(libxml_get_external_entity_loader);
41 
42 
43 static const zend_function_entry ext_functions[] = {
44 	ZEND_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context)
45 	ZEND_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors)
46 	ZEND_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
47 	ZEND_FE(libxml_get_errors, arginfo_libxml_get_errors)
48 	ZEND_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
49 	ZEND_DEP_FE(libxml_disable_entity_loader, arginfo_libxml_disable_entity_loader)
50 	ZEND_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader)
51 	ZEND_FE(libxml_get_external_entity_loader, arginfo_libxml_get_external_entity_loader)
52 	ZEND_FE_END
53 };
54 
55 
56 static const zend_function_entry class_LibXMLError_methods[] = {
57 	ZEND_FE_END
58 };
59 
register_libxml_symbols(int module_number)60 static void register_libxml_symbols(int module_number)
61 {
62 	REGISTER_LONG_CONSTANT("LIBXML_VERSION", LIBXML_VERSION, CONST_PERSISTENT);
63 	REGISTER_STRING_CONSTANT("LIBXML_DOTTED_VERSION", LIBXML_DOTTED_VERSION, CONST_PERSISTENT);
64 	REGISTER_STRING_CONSTANT("LIBXML_LOADED_VERSION", PHP_LIBXML_LOADED_VERSION, CONST_PERSISTENT);
65 	REGISTER_LONG_CONSTANT("LIBXML_NOENT", XML_PARSE_NOENT, CONST_PERSISTENT);
66 	REGISTER_LONG_CONSTANT("LIBXML_DTDLOAD", XML_PARSE_DTDLOAD, CONST_PERSISTENT);
67 	REGISTER_LONG_CONSTANT("LIBXML_DTDATTR", XML_PARSE_DTDATTR, CONST_PERSISTENT);
68 	REGISTER_LONG_CONSTANT("LIBXML_DTDVALID", XML_PARSE_DTDVALID, CONST_PERSISTENT);
69 	REGISTER_LONG_CONSTANT("LIBXML_NOERROR", XML_PARSE_NOERROR, CONST_PERSISTENT);
70 	REGISTER_LONG_CONSTANT("LIBXML_NOWARNING", XML_PARSE_NOWARNING, CONST_PERSISTENT);
71 	REGISTER_LONG_CONSTANT("LIBXML_NOBLANKS", XML_PARSE_NOBLANKS, CONST_PERSISTENT);
72 	REGISTER_LONG_CONSTANT("LIBXML_XINCLUDE", XML_PARSE_XINCLUDE, CONST_PERSISTENT);
73 	REGISTER_LONG_CONSTANT("LIBXML_NSCLEAN", XML_PARSE_NSCLEAN, CONST_PERSISTENT);
74 	REGISTER_LONG_CONSTANT("LIBXML_NOCDATA", XML_PARSE_NOCDATA, CONST_PERSISTENT);
75 	REGISTER_LONG_CONSTANT("LIBXML_NONET", XML_PARSE_NONET, CONST_PERSISTENT);
76 	REGISTER_LONG_CONSTANT("LIBXML_PEDANTIC", XML_PARSE_PEDANTIC, CONST_PERSISTENT);
77 	REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_PERSISTENT);
78 	REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_PERSISTENT);
79 	REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_PERSISTENT);
80 #if LIBXML_VERSION >= 20900
81 	REGISTER_LONG_CONSTANT("LIBXML_BIGLINES", XML_PARSE_BIG_LINES, CONST_PERSISTENT);
82 #endif
83 	REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_PERSISTENT);
84 #if defined(LIBXML_SCHEMAS_ENABLED)
85 	REGISTER_LONG_CONSTANT("LIBXML_SCHEMA_CREATE", XML_SCHEMA_VAL_VC_I_CREATE, CONST_PERSISTENT);
86 #endif
87 #if LIBXML_VERSION >= 20707
88 	REGISTER_LONG_CONSTANT("LIBXML_HTML_NOIMPLIED", HTML_PARSE_NOIMPLIED, CONST_PERSISTENT);
89 #endif
90 #if LIBXML_VERSION >= 20708
91 	REGISTER_LONG_CONSTANT("LIBXML_HTML_NODEFDTD", HTML_PARSE_NODEFDTD, CONST_PERSISTENT);
92 #endif
93 	REGISTER_LONG_CONSTANT("LIBXML_ERR_NONE", XML_ERR_NONE, CONST_PERSISTENT);
94 	REGISTER_LONG_CONSTANT("LIBXML_ERR_WARNING", XML_ERR_WARNING, CONST_PERSISTENT);
95 	REGISTER_LONG_CONSTANT("LIBXML_ERR_ERROR", XML_ERR_ERROR, CONST_PERSISTENT);
96 	REGISTER_LONG_CONSTANT("LIBXML_ERR_FATAL", XML_ERR_FATAL, CONST_PERSISTENT);
97 }
98 
register_class_LibXMLError(void)99 static zend_class_entry *register_class_LibXMLError(void)
100 {
101 	zend_class_entry ce, *class_entry;
102 
103 	INIT_CLASS_ENTRY(ce, "LibXMLError", class_LibXMLError_methods);
104 	class_entry = zend_register_internal_class_ex(&ce, NULL);
105 
106 	zval property_level_default_value;
107 	ZVAL_UNDEF(&property_level_default_value);
108 	zend_string *property_level_name = zend_string_init("level", sizeof("level") - 1, 1);
109 	zend_declare_typed_property(class_entry, property_level_name, &property_level_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
110 	zend_string_release(property_level_name);
111 
112 	zval property_code_default_value;
113 	ZVAL_UNDEF(&property_code_default_value);
114 	zend_string *property_code_name = zend_string_init("code", sizeof("code") - 1, 1);
115 	zend_declare_typed_property(class_entry, property_code_name, &property_code_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
116 	zend_string_release(property_code_name);
117 
118 	zval property_column_default_value;
119 	ZVAL_UNDEF(&property_column_default_value);
120 	zend_string *property_column_name = zend_string_init("column", sizeof("column") - 1, 1);
121 	zend_declare_typed_property(class_entry, property_column_name, &property_column_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
122 	zend_string_release(property_column_name);
123 
124 	zval property_message_default_value;
125 	ZVAL_UNDEF(&property_message_default_value);
126 	zend_string *property_message_name = zend_string_init("message", sizeof("message") - 1, 1);
127 	zend_declare_typed_property(class_entry, property_message_name, &property_message_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
128 	zend_string_release(property_message_name);
129 
130 	zval property_file_default_value;
131 	ZVAL_UNDEF(&property_file_default_value);
132 	zend_string *property_file_name = zend_string_init("file", sizeof("file") - 1, 1);
133 	zend_declare_typed_property(class_entry, property_file_name, &property_file_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
134 	zend_string_release(property_file_name);
135 
136 	zval property_line_default_value;
137 	ZVAL_UNDEF(&property_line_default_value);
138 	zend_string *property_line_name = zend_string_init("line", sizeof("line") - 1, 1);
139 	zend_declare_typed_property(class_entry, property_line_name, &property_line_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
140 	zend_string_release(property_line_name);
141 
142 	return class_entry;
143 }
144