xref: /PHP-7.3/ext/dom/dom_fe.h (revision 8d3f8ca1)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2018 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Christian Stocker <chregu@php.net>                          |
16    |          Rob Richards <rrichards@php.net>                            |
17    +----------------------------------------------------------------------+
18 */
19 
20 #ifndef DOM_FE_H
21 #define DOM_FE_H
22 
23 extern const zend_function_entry php_dom_domexception_class_functions[];
24 extern const zend_function_entry php_dom_domstringlist_class_functions[];
25 extern const zend_function_entry php_dom_namelist_class_functions[];
26 extern const zend_function_entry php_dom_domimplementationlist_class_functions[];
27 extern const zend_function_entry php_dom_domimplementationsource_class_functions[];
28 extern const zend_function_entry php_dom_domimplementation_class_functions[];
29 extern const zend_function_entry php_dom_documentfragment_class_functions[];
30 extern const zend_function_entry php_dom_document_class_functions[];
31 extern const zend_function_entry php_dom_node_class_functions[];
32 extern const zend_function_entry php_dom_nodelist_class_functions[];
33 extern const zend_function_entry php_dom_namednodemap_class_functions[];
34 extern const zend_function_entry php_dom_characterdata_class_functions[];
35 extern const zend_function_entry php_dom_attr_class_functions[];
36 extern const zend_function_entry php_dom_element_class_functions[];
37 extern const zend_function_entry php_dom_text_class_functions[];
38 extern const zend_function_entry php_dom_comment_class_functions[];
39 extern const zend_function_entry php_dom_typeinfo_class_functions[];
40 extern const zend_function_entry php_dom_userdatahandler_class_functions[];
41 extern const zend_function_entry php_dom_domerror_class_functions[];
42 extern const zend_function_entry php_dom_domerrorhandler_class_functions[];
43 extern const zend_function_entry php_dom_domlocator_class_functions[];
44 extern const zend_function_entry php_dom_domconfiguration_class_functions[];
45 extern const zend_function_entry php_dom_cdatasection_class_functions[];
46 extern const zend_function_entry php_dom_documenttype_class_functions[];
47 extern const zend_function_entry php_dom_notation_class_functions[];
48 extern const zend_function_entry php_dom_entity_class_functions[];
49 extern const zend_function_entry php_dom_entityreference_class_functions[];
50 extern const zend_function_entry php_dom_processinginstruction_class_functions[];
51 extern const zend_function_entry php_dom_string_extend_class_functions[];
52 extern const zend_function_entry php_dom_xpath_class_functions[];
53 
54 /* domexception errors */
55 typedef enum {
56 /* PHP_ERR is non-spec code for PHP errors: */
57 	PHP_ERR                        = 0,
58 	INDEX_SIZE_ERR                 = 1,
59 	DOMSTRING_SIZE_ERR             = 2,
60 	HIERARCHY_REQUEST_ERR          = 3,
61 	WRONG_DOCUMENT_ERR             = 4,
62 	INVALID_CHARACTER_ERR          = 5,
63 	NO_DATA_ALLOWED_ERR            = 6,
64 	NO_MODIFICATION_ALLOWED_ERR    = 7,
65 	NOT_FOUND_ERR                  = 8,
66 	NOT_SUPPORTED_ERR              = 9,
67 	INUSE_ATTRIBUTE_ERR            = 10,
68 /* Introduced in DOM Level 2: */
69 	INVALID_STATE_ERR              = 11,
70 /* Introduced in DOM Level 2: */
71 	SYNTAX_ERR                     = 12,
72 /* Introduced in DOM Level 2: */
73 	INVALID_MODIFICATION_ERR       = 13,
74 /* Introduced in DOM Level 2: */
75 	NAMESPACE_ERR                  = 14,
76 /* Introduced in DOM Level 2: */
77 	INVALID_ACCESS_ERR             = 15,
78 /* Introduced in DOM Level 3: */
79 	VALIDATION_ERR                 = 16
80 } dom_exception_code;
81 
82 /* domstringlist methods */
83 PHP_FUNCTION(dom_domstringlist_item);
84 
85 /* domnamelist methods */
86 PHP_FUNCTION(dom_namelist_get_name);
87 PHP_FUNCTION(dom_namelist_get_namespace_uri);
88 
89 /* domimplementationlist methods */
90 PHP_FUNCTION(dom_domimplementationlist_item);
91 
92 /* domimplementationsource methods */
93 PHP_FUNCTION(dom_domimplementationsource_get_domimplementation);
94 PHP_FUNCTION(dom_domimplementationsource_get_domimplementations);
95 
96 /* domimplementation methods */
97 PHP_METHOD(domimplementation, hasFeature);
98 PHP_METHOD(domimplementation, createDocumentType);
99 PHP_METHOD(domimplementation, createDocument);
100 PHP_METHOD(domimplementation, getFeature);
101 
102 /* domdocumentfragment methods */
103 PHP_METHOD(domdocumentfragment, __construct);
104 PHP_METHOD(domdocumentfragment, appendXML);
105 
106 /* domdocument methods */
107 PHP_FUNCTION(dom_document_create_element);
108 PHP_FUNCTION(dom_document_create_document_fragment);
109 PHP_FUNCTION(dom_document_create_text_node);
110 PHP_FUNCTION(dom_document_create_comment);
111 PHP_FUNCTION(dom_document_create_cdatasection);
112 PHP_FUNCTION(dom_document_create_processing_instruction);
113 PHP_FUNCTION(dom_document_create_attribute);
114 PHP_FUNCTION(dom_document_create_entity_reference);
115 PHP_FUNCTION(dom_document_get_elements_by_tag_name);
116 PHP_FUNCTION(dom_document_import_node);
117 PHP_FUNCTION(dom_document_create_element_ns);
118 PHP_FUNCTION(dom_document_create_attribute_ns);
119 PHP_FUNCTION(dom_document_get_elements_by_tag_name_ns);
120 PHP_FUNCTION(dom_document_get_element_by_id);
121 PHP_FUNCTION(dom_document_adopt_node);
122 PHP_FUNCTION(dom_document_normalize_document);
123 PHP_FUNCTION(dom_document_rename_node);
124 PHP_METHOD(domdocument, __construct);
125 	/* convienience methods */
126 PHP_METHOD(domdocument, load);
127 PHP_FUNCTION(dom_document_save);
128 PHP_METHOD(domdocument, loadXML);
129 PHP_FUNCTION(dom_document_savexml);
130 PHP_FUNCTION(dom_document_validate);
131 PHP_FUNCTION(dom_document_xinclude);
132 PHP_METHOD(domdocument, registerNodeClass);
133 
134 #if defined(LIBXML_HTML_ENABLED)
135 PHP_METHOD(domdocument, loadHTML);
136 PHP_METHOD(domdocument, loadHTMLFile);
137 PHP_FUNCTION(dom_document_save_html);
138 PHP_FUNCTION(dom_document_save_html_file);
139 #endif  /* defined(LIBXML_HTML_ENABLED) */
140 
141 #if defined(LIBXML_SCHEMAS_ENABLED)
142 PHP_FUNCTION(dom_document_schema_validate_file);
143 PHP_FUNCTION(dom_document_schema_validate_xml);
144 PHP_FUNCTION(dom_document_relaxNG_validate_file);
145 PHP_FUNCTION(dom_document_relaxNG_validate_xml);
146 #endif
147 
148 /* domnode methods */
149 PHP_FUNCTION(dom_node_insert_before);
150 PHP_FUNCTION(dom_node_replace_child);
151 PHP_FUNCTION(dom_node_remove_child);
152 PHP_FUNCTION(dom_node_append_child);
153 PHP_FUNCTION(dom_node_has_child_nodes);
154 PHP_FUNCTION(dom_node_clone_node);
155 PHP_FUNCTION(dom_node_normalize);
156 PHP_FUNCTION(dom_node_is_supported);
157 PHP_FUNCTION(dom_node_has_attributes);
158 PHP_FUNCTION(dom_node_compare_document_position);
159 PHP_FUNCTION(dom_node_is_same_node);
160 PHP_FUNCTION(dom_node_lookup_prefix);
161 PHP_FUNCTION(dom_node_is_default_namespace);
162 PHP_FUNCTION(dom_node_lookup_namespace_uri);
163 PHP_FUNCTION(dom_node_is_equal_node);
164 PHP_FUNCTION(dom_node_get_feature);
165 PHP_FUNCTION(dom_node_set_user_data);
166 PHP_FUNCTION(dom_node_get_user_data);
167 PHP_METHOD(domnode, C14N);
168 PHP_METHOD(domnode, C14NFile);
169 PHP_METHOD(domnode, getNodePath);
170 PHP_METHOD(domnode, getLineNo);
171 
172 /* domnodelist methods */
173 PHP_FUNCTION(dom_nodelist_item);
174 PHP_FUNCTION(dom_nodelist_count);
175 
176 /* domnamednodemap methods */
177 PHP_FUNCTION(dom_namednodemap_get_named_item);
178 PHP_FUNCTION(dom_namednodemap_set_named_item);
179 PHP_FUNCTION(dom_namednodemap_remove_named_item);
180 PHP_FUNCTION(dom_namednodemap_item);
181 PHP_FUNCTION(dom_namednodemap_get_named_item_ns);
182 PHP_FUNCTION(dom_namednodemap_set_named_item_ns);
183 PHP_FUNCTION(dom_namednodemap_remove_named_item_ns);
184 PHP_FUNCTION(dom_namednodemap_count);
185 
186 /* domcharacterdata methods */
187 PHP_FUNCTION(dom_characterdata_substring_data);
188 PHP_FUNCTION(dom_characterdata_append_data);
189 PHP_FUNCTION(dom_characterdata_insert_data);
190 PHP_FUNCTION(dom_characterdata_delete_data);
191 PHP_FUNCTION(dom_characterdata_replace_data);
192 
193 /* domattr methods */
194 PHP_FUNCTION(dom_attr_is_id);
195 PHP_METHOD(domattr, __construct);
196 
197 /* domelement methods */
198 PHP_FUNCTION(dom_element_get_attribute);
199 PHP_FUNCTION(dom_element_set_attribute);
200 PHP_FUNCTION(dom_element_remove_attribute);
201 PHP_FUNCTION(dom_element_get_attribute_node);
202 PHP_FUNCTION(dom_element_set_attribute_node);
203 PHP_FUNCTION(dom_element_remove_attribute_node);
204 PHP_FUNCTION(dom_element_get_elements_by_tag_name);
205 PHP_FUNCTION(dom_element_get_attribute_ns);
206 PHP_FUNCTION(dom_element_set_attribute_ns);
207 PHP_FUNCTION(dom_element_remove_attribute_ns);
208 PHP_FUNCTION(dom_element_get_attribute_node_ns);
209 PHP_FUNCTION(dom_element_set_attribute_node_ns);
210 PHP_FUNCTION(dom_element_get_elements_by_tag_name_ns);
211 PHP_FUNCTION(dom_element_has_attribute);
212 PHP_FUNCTION(dom_element_has_attribute_ns);
213 PHP_FUNCTION(dom_element_set_id_attribute);
214 PHP_FUNCTION(dom_element_set_id_attribute_ns);
215 PHP_FUNCTION(dom_element_set_id_attribute_node);
216 PHP_METHOD(domelement, __construct);
217 
218 /* domtext methods */
219 PHP_FUNCTION(dom_text_split_text);
220 PHP_FUNCTION(dom_text_is_whitespace_in_element_content);
221 PHP_FUNCTION(dom_text_replace_whole_text);
222 PHP_METHOD(domtext, __construct);
223 
224 /* domcomment methods */
225 PHP_METHOD(domcomment, __construct);
226 
227 /* domtypeinfo methods */
228 
229 /* domuserdatahandler methods */
230 PHP_FUNCTION(dom_userdatahandler_handle);
231 
232 /* domdomerror methods */
233 
234 /* domerrorhandler methods */
235 PHP_FUNCTION(dom_domerrorhandler_handle_error);
236 
237 /* domlocator methods */
238 
239 /* domconfiguration methods */
240 PHP_FUNCTION(dom_domconfiguration_set_parameter);
241 PHP_FUNCTION(dom_domconfiguration_get_parameter);
242 PHP_FUNCTION(dom_domconfiguration_can_set_parameter);
243 
244 /* domcdatasection methods */
245 PHP_METHOD(domcdatasection, __construct);
246 
247 /* domdocumenttype methods */
248 
249 /* domnotation methods */
250 
251 /* domentity methods */
252 
253 /* domentityreference methods */
254 PHP_METHOD(domentityreference, __construct);
255 
256 /* domprocessinginstruction methods */
257 PHP_METHOD(domprocessinginstruction, __construct);
258 
259 /* string_extend methods */
260 PHP_FUNCTION(dom_string_extend_find_offset16);
261 PHP_FUNCTION(dom_string_extend_find_offset32);
262 
263 #if defined(LIBXML_XPATH_ENABLED)
264 /* xpath methods */
265 PHP_METHOD(domxpath, __construct);
266 PHP_FUNCTION(dom_xpath_register_ns);
267 PHP_FUNCTION(dom_xpath_query);
268 PHP_FUNCTION(dom_xpath_evaluate);
269 PHP_FUNCTION(dom_xpath_register_php_functions);
270 #endif
271 
272 #endif /* DOM_FE_H */
273 
274 /*
275  * Local variables:
276  * tab-width: 4
277  * c-basic-offset: 4
278  * End:
279  * vim600: noet sw=4 ts=4 fdm=marker
280  * vim<600: noet sw=4 ts=4
281  */
282