xref: /PHP-8.2/ext/xml/xml_arginfo.h (revision 2aea9be3)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: be5c43665b81e1274d6cdf7d8b18011119f442de */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_xml_parser_create, 0, 0, XMLParser, 0)
5 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
6 ZEND_END_ARG_INFO()
7 
8 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_xml_parser_create_ns, 0, 0, XMLParser, 0)
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
10 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\":\"")
11 ZEND_END_ARG_INFO()
12 
13 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_set_object, 0, 2, IS_TRUE, 0)
14 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
15 	ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
16 ZEND_END_ARG_INFO()
17 
18 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_set_element_handler, 0, 3, IS_TRUE, 0)
19 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
20 	ZEND_ARG_INFO(0, start_handler)
21 	ZEND_ARG_INFO(0, end_handler)
22 ZEND_END_ARG_INFO()
23 
24 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_set_character_data_handler, 0, 2, IS_TRUE, 0)
25 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
26 	ZEND_ARG_INFO(0, handler)
27 ZEND_END_ARG_INFO()
28 
29 #define arginfo_xml_set_processing_instruction_handler arginfo_xml_set_character_data_handler
30 
31 #define arginfo_xml_set_default_handler arginfo_xml_set_character_data_handler
32 
33 #define arginfo_xml_set_unparsed_entity_decl_handler arginfo_xml_set_character_data_handler
34 
35 #define arginfo_xml_set_notation_decl_handler arginfo_xml_set_character_data_handler
36 
37 #define arginfo_xml_set_external_entity_ref_handler arginfo_xml_set_character_data_handler
38 
39 #define arginfo_xml_set_start_namespace_decl_handler arginfo_xml_set_character_data_handler
40 
41 #define arginfo_xml_set_end_namespace_decl_handler arginfo_xml_set_character_data_handler
42 
43 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parse, 0, 2, IS_LONG, 0)
44 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
45 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
46 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_final, _IS_BOOL, 0, "false")
47 ZEND_END_ARG_INFO()
48 
49 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xml_parse_into_struct, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
50 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
51 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
52 	ZEND_ARG_INFO(1, values)
53 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, index, "null")
54 ZEND_END_ARG_INFO()
55 
56 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_get_error_code, 0, 1, IS_LONG, 0)
57 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
58 ZEND_END_ARG_INFO()
59 
60 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_error_string, 0, 1, IS_STRING, 1)
61 	ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0)
62 ZEND_END_ARG_INFO()
63 
64 #define arginfo_xml_get_current_line_number arginfo_xml_get_error_code
65 
66 #define arginfo_xml_get_current_column_number arginfo_xml_get_error_code
67 
68 #define arginfo_xml_get_current_byte_index arginfo_xml_get_error_code
69 
70 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parser_free, 0, 1, _IS_BOOL, 0)
71 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
72 ZEND_END_ARG_INFO()
73 
74 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parser_set_option, 0, 3, _IS_BOOL, 0)
75 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
76 	ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
77 	ZEND_ARG_INFO(0, value)
78 ZEND_END_ARG_INFO()
79 
80 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xml_parser_get_option, 0, 2, MAY_BE_STRING|MAY_BE_LONG)
81 	ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
82 	ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
83 ZEND_END_ARG_INFO()
84 
85 
86 ZEND_FUNCTION(xml_parser_create);
87 ZEND_FUNCTION(xml_parser_create_ns);
88 ZEND_FUNCTION(xml_set_object);
89 ZEND_FUNCTION(xml_set_element_handler);
90 ZEND_FUNCTION(xml_set_character_data_handler);
91 ZEND_FUNCTION(xml_set_processing_instruction_handler);
92 ZEND_FUNCTION(xml_set_default_handler);
93 ZEND_FUNCTION(xml_set_unparsed_entity_decl_handler);
94 ZEND_FUNCTION(xml_set_notation_decl_handler);
95 ZEND_FUNCTION(xml_set_external_entity_ref_handler);
96 ZEND_FUNCTION(xml_set_start_namespace_decl_handler);
97 ZEND_FUNCTION(xml_set_end_namespace_decl_handler);
98 ZEND_FUNCTION(xml_parse);
99 ZEND_FUNCTION(xml_parse_into_struct);
100 ZEND_FUNCTION(xml_get_error_code);
101 ZEND_FUNCTION(xml_error_string);
102 ZEND_FUNCTION(xml_get_current_line_number);
103 ZEND_FUNCTION(xml_get_current_column_number);
104 ZEND_FUNCTION(xml_get_current_byte_index);
105 ZEND_FUNCTION(xml_parser_free);
106 ZEND_FUNCTION(xml_parser_set_option);
107 ZEND_FUNCTION(xml_parser_get_option);
108 
109 
110 static const zend_function_entry ext_functions[] = {
111 	ZEND_FE(xml_parser_create, arginfo_xml_parser_create)
112 	ZEND_FE(xml_parser_create_ns, arginfo_xml_parser_create_ns)
113 	ZEND_FE(xml_set_object, arginfo_xml_set_object)
114 	ZEND_FE(xml_set_element_handler, arginfo_xml_set_element_handler)
115 	ZEND_FE(xml_set_character_data_handler, arginfo_xml_set_character_data_handler)
116 	ZEND_FE(xml_set_processing_instruction_handler, arginfo_xml_set_processing_instruction_handler)
117 	ZEND_FE(xml_set_default_handler, arginfo_xml_set_default_handler)
118 	ZEND_FE(xml_set_unparsed_entity_decl_handler, arginfo_xml_set_unparsed_entity_decl_handler)
119 	ZEND_FE(xml_set_notation_decl_handler, arginfo_xml_set_notation_decl_handler)
120 	ZEND_FE(xml_set_external_entity_ref_handler, arginfo_xml_set_external_entity_ref_handler)
121 	ZEND_FE(xml_set_start_namespace_decl_handler, arginfo_xml_set_start_namespace_decl_handler)
122 	ZEND_FE(xml_set_end_namespace_decl_handler, arginfo_xml_set_end_namespace_decl_handler)
123 	ZEND_FE(xml_parse, arginfo_xml_parse)
124 	ZEND_FE(xml_parse_into_struct, arginfo_xml_parse_into_struct)
125 	ZEND_FE(xml_get_error_code, arginfo_xml_get_error_code)
126 	ZEND_FE(xml_error_string, arginfo_xml_error_string)
127 	ZEND_FE(xml_get_current_line_number, arginfo_xml_get_current_line_number)
128 	ZEND_FE(xml_get_current_column_number, arginfo_xml_get_current_column_number)
129 	ZEND_FE(xml_get_current_byte_index, arginfo_xml_get_current_byte_index)
130 	ZEND_FE(xml_parser_free, arginfo_xml_parser_free)
131 	ZEND_FE(xml_parser_set_option, arginfo_xml_parser_set_option)
132 	ZEND_FE(xml_parser_get_option, arginfo_xml_parser_get_option)
133 	ZEND_FE_END
134 };
135 
136 
137 static const zend_function_entry class_XMLParser_methods[] = {
138 	ZEND_FE_END
139 };
140 
register_xml_symbols(int module_number)141 static void register_xml_symbols(int module_number)
142 {
143 	REGISTER_LONG_CONSTANT("XML_ERROR_NONE", XML_ERROR_NONE, CONST_PERSISTENT);
144 	REGISTER_LONG_CONSTANT("XML_ERROR_NO_MEMORY", XML_ERROR_NO_MEMORY, CONST_PERSISTENT);
145 	REGISTER_LONG_CONSTANT("XML_ERROR_SYNTAX", XML_ERROR_SYNTAX, CONST_PERSISTENT);
146 	REGISTER_LONG_CONSTANT("XML_ERROR_NO_ELEMENTS", XML_ERROR_NO_ELEMENTS, CONST_PERSISTENT);
147 	REGISTER_LONG_CONSTANT("XML_ERROR_INVALID_TOKEN", XML_ERROR_INVALID_TOKEN, CONST_PERSISTENT);
148 	REGISTER_LONG_CONSTANT("XML_ERROR_UNCLOSED_TOKEN", XML_ERROR_UNCLOSED_TOKEN, CONST_PERSISTENT);
149 	REGISTER_LONG_CONSTANT("XML_ERROR_PARTIAL_CHAR", XML_ERROR_PARTIAL_CHAR, CONST_PERSISTENT);
150 	REGISTER_LONG_CONSTANT("XML_ERROR_TAG_MISMATCH", XML_ERROR_TAG_MISMATCH, CONST_PERSISTENT);
151 	REGISTER_LONG_CONSTANT("XML_ERROR_DUPLICATE_ATTRIBUTE", XML_ERROR_DUPLICATE_ATTRIBUTE, CONST_PERSISTENT);
152 	REGISTER_LONG_CONSTANT("XML_ERROR_JUNK_AFTER_DOC_ELEMENT", XML_ERROR_JUNK_AFTER_DOC_ELEMENT, CONST_PERSISTENT);
153 	REGISTER_LONG_CONSTANT("XML_ERROR_PARAM_ENTITY_REF", XML_ERROR_PARAM_ENTITY_REF, CONST_PERSISTENT);
154 	REGISTER_LONG_CONSTANT("XML_ERROR_UNDEFINED_ENTITY", XML_ERROR_UNDEFINED_ENTITY, CONST_PERSISTENT);
155 	REGISTER_LONG_CONSTANT("XML_ERROR_RECURSIVE_ENTITY_REF", XML_ERROR_RECURSIVE_ENTITY_REF, CONST_PERSISTENT);
156 	REGISTER_LONG_CONSTANT("XML_ERROR_ASYNC_ENTITY", XML_ERROR_ASYNC_ENTITY, CONST_PERSISTENT);
157 	REGISTER_LONG_CONSTANT("XML_ERROR_BAD_CHAR_REF", XML_ERROR_BAD_CHAR_REF, CONST_PERSISTENT);
158 	REGISTER_LONG_CONSTANT("XML_ERROR_BINARY_ENTITY_REF", XML_ERROR_BINARY_ENTITY_REF, CONST_PERSISTENT);
159 	REGISTER_LONG_CONSTANT("XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF", XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, CONST_PERSISTENT);
160 	REGISTER_LONG_CONSTANT("XML_ERROR_MISPLACED_XML_PI", XML_ERROR_MISPLACED_XML_PI, CONST_PERSISTENT);
161 	REGISTER_LONG_CONSTANT("XML_ERROR_UNKNOWN_ENCODING", XML_ERROR_UNKNOWN_ENCODING, CONST_PERSISTENT);
162 	REGISTER_LONG_CONSTANT("XML_ERROR_INCORRECT_ENCODING", XML_ERROR_INCORRECT_ENCODING, CONST_PERSISTENT);
163 	REGISTER_LONG_CONSTANT("XML_ERROR_UNCLOSED_CDATA_SECTION", XML_ERROR_UNCLOSED_CDATA_SECTION, CONST_PERSISTENT);
164 	REGISTER_LONG_CONSTANT("XML_ERROR_EXTERNAL_ENTITY_HANDLING", XML_ERROR_EXTERNAL_ENTITY_HANDLING, CONST_PERSISTENT);
165 	REGISTER_LONG_CONSTANT("XML_OPTION_CASE_FOLDING", PHP_XML_OPTION_CASE_FOLDING, CONST_PERSISTENT);
166 	REGISTER_LONG_CONSTANT("XML_OPTION_TARGET_ENCODING", PHP_XML_OPTION_TARGET_ENCODING, CONST_PERSISTENT);
167 	REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_TAGSTART", PHP_XML_OPTION_SKIP_TAGSTART, CONST_PERSISTENT);
168 	REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_WHITE", PHP_XML_OPTION_SKIP_WHITE, CONST_PERSISTENT);
169 }
170 
register_class_XMLParser(void)171 static zend_class_entry *register_class_XMLParser(void)
172 {
173 	zend_class_entry ce, *class_entry;
174 
175 	INIT_CLASS_ENTRY(ce, "XMLParser", class_XMLParser_methods);
176 	class_entry = zend_register_internal_class_ex(&ce, NULL);
177 	class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
178 
179 	return class_entry;
180 }
181