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