summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dom/attr.c15
-rw-r--r--ext/dom/cdatasection.c10
-rw-r--r--ext/dom/characterdata.c39
-rw-r--r--ext/dom/comment.c10
-rw-r--r--ext/dom/document.c213
-rw-r--r--ext/dom/documentfragment.c14
-rw-r--r--ext/dom/dom.stub.php330
-rw-r--r--ext/dom/dom_arginfo.h397
-rw-r--r--ext/dom/domimplementation.c44
-rw-r--r--ext/dom/element.c131
-rw-r--r--ext/dom/entityreference.c9
-rw-r--r--ext/dom/namednodemap.c27
-rw-r--r--ext/dom/node.c125
-rw-r--r--ext/dom/nodelist.c17
-rw-r--r--ext/dom/php_dom.c7
-rw-r--r--ext/dom/processinginstruction.c11
-rw-r--r--ext/dom/tests/DOMDocument_adoptNode.phpt16
-rw-r--r--ext/dom/text.c22
-rw-r--r--ext/dom/xpath.c38
19 files changed, 876 insertions, 599 deletions
diff --git a/ext/dom/attr.c b/ext/dom/attr.c
index ade037a765..f9da264266 100644
--- a/ext/dom/attr.c
+++ b/ext/dom/attr.c
@@ -24,16 +24,7 @@
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_construct, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMAttr extends DOMNode
@@ -43,8 +34,8 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_attr_class_functions[] = {
- PHP_FALIAS(isId, dom_attr_is_id, arginfo_dom_attr_is_id)
- PHP_ME(domattr, __construct, arginfo_dom_attr_construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(isId, dom_attr_is_id, arginfo_class_DOMAttr_isId)
+ PHP_ME(domattr, __construct, arginfo_class_DOMAttr___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c
index 995102fc3e..55fae82d2e 100644
--- a/ext/dom/cdatasection.c
+++ b/ext/dom/cdatasection.c
@@ -22,13 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_cdatasection_construct, 0, 0, 1)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMCdataSection extends DOMText
@@ -38,7 +32,7 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_cdatasection_class_functions[] = {
- PHP_ME(domcdatasection, __construct, arginfo_dom_cdatasection_construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domcdatasection, __construct, arginfo_class_DOMCdataSection___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c
index 2363cc6003..c4b0cb998c 100644
--- a/ext/dom/characterdata.c
+++ b/ext/dom/characterdata.c
@@ -22,34 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_substring_data, 0, 0, 2)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, count)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_append_data, 0, 0, 1)
- ZEND_ARG_INFO(0, arg)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_insert_data, 0, 0, 2)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, arg)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_delete_data, 0, 0, 2)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, count)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_replace_data, 0, 0, 3)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, count)
- ZEND_ARG_INFO(0, arg)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMCharacterData extends DOMNode
@@ -59,11 +32,11 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_characterdata_class_functions[] = {
- PHP_FALIAS(substringData, dom_characterdata_substring_data, arginfo_dom_characterdata_substring_data)
- PHP_FALIAS(appendData, dom_characterdata_append_data, arginfo_dom_characterdata_append_data)
- PHP_FALIAS(insertData, dom_characterdata_insert_data, arginfo_dom_characterdata_insert_data)
- PHP_FALIAS(deleteData, dom_characterdata_delete_data, arginfo_dom_characterdata_delete_data)
- PHP_FALIAS(replaceData, dom_characterdata_replace_data, arginfo_dom_characterdata_replace_data)
+ PHP_FALIAS(substringData, dom_characterdata_substring_data, arginfo_class_DOMCharacterData_substringData)
+ PHP_FALIAS(appendData, dom_characterdata_append_data, arginfo_class_DOMCharacterData_appendData)
+ PHP_FALIAS(insertData, dom_characterdata_insert_data, arginfo_class_DOMCharacterData_insertData)
+ PHP_FALIAS(deleteData, dom_characterdata_delete_data, arginfo_class_DOMCharacterData_deleteData)
+ PHP_FALIAS(replaceData, dom_characterdata_replace_data, arginfo_class_DOMCharacterData_replaceData)
PHP_FE_END
};
diff --git a/ext/dom/comment.c b/ext/dom/comment.c
index 10b3607f3c..c3019d6938 100644
--- a/ext/dom/comment.c
+++ b/ext/dom/comment.c
@@ -22,13 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_comment_construct, 0, 0, 0)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMComment extends DOMCharacterData
@@ -38,7 +32,7 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_comment_class_functions[] = {
- PHP_ME(domcomment, __construct, arginfo_dom_comment_construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domcomment, __construct, arginfo_class_DOMComment___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 0e996bf8ea..8c3bbb3747 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -22,6 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
+#include "dom_arginfo.h"
#include <libxml/SAX.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/relaxng.h>
@@ -37,146 +38,6 @@ struct _idsIterator {
#define DOM_LOAD_STRING 0
#define DOM_LOAD_FILE 1
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_element, 0, 0, 1)
- ZEND_ARG_INFO(0, tagName)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_document_fragment, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_text_node, 0, 0, 1)
- ZEND_ARG_INFO(0, data)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_comment, 0, 0, 1)
- ZEND_ARG_INFO(0, data)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_cdatasection, 0, 0, 1)
- ZEND_ARG_INFO(0, data)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_processing_instruction, 0, 0, 1)
- ZEND_ARG_INFO(0, target)
- ZEND_ARG_INFO(0, data)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_attribute, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_entity_reference, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_elements_by_tag_name, 0, 0, 1)
- ZEND_ARG_INFO(0, tagName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_import_node, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, importedNode, DOMNode, 0)
- ZEND_ARG_INFO(0, deep)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_element_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, qualifiedName)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_create_attribute_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, qualifiedName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_elements_by_tag_name_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_get_element_by_id, 0, 0, 1)
- ZEND_ARG_INFO(0, elementId)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_adopt_node, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, source, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_normalize_document, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_load, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_save, 0, 0, 1)
- ZEND_ARG_INFO(0, file)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadxml, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
- ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_construct, 0, 0, 0)
- ZEND_ARG_INFO(0, version)
- ZEND_ARG_INFO(0, encoding)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_validate, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_xinclude, 0, 0, 0)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtml, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtmlfile, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtmlfile, 0, 0, 1)
- ZEND_ARG_INFO(0, file)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_schema_validate_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_schema_validate_xml, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_relaxNG_validate_file, 0, 0, 1)
- ZEND_ARG_INFO(0, filename)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_relaxNG_validate_xml, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_registernodeclass, 0, 0, 2)
- ZEND_ARG_INFO(0, baseClass)
- ZEND_ARG_INFO(0, extendedClass)
-ZEND_END_ARG_INFO();
-/* }}} */
-
/*
* class DOMDocument extends DOMNode
*
@@ -185,42 +46,42 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */
- PHP_FALIAS(createElement, dom_document_create_element, arginfo_dom_document_create_element)
- PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, arginfo_dom_document_create_document_fragment)
- PHP_FALIAS(createTextNode, dom_document_create_text_node, arginfo_dom_document_create_text_node)
- PHP_FALIAS(createComment, dom_document_create_comment, arginfo_dom_document_create_comment)
- PHP_FALIAS(createCDATASection, dom_document_create_cdatasection, arginfo_dom_document_create_cdatasection)
- PHP_FALIAS(createProcessingInstruction, dom_document_create_processing_instruction, arginfo_dom_document_create_processing_instruction)
- PHP_FALIAS(createAttribute, dom_document_create_attribute, arginfo_dom_document_create_attribute)
- PHP_FALIAS(createEntityReference, dom_document_create_entity_reference, arginfo_dom_document_create_entity_reference)
- PHP_FALIAS(getElementsByTagName, dom_document_get_elements_by_tag_name, arginfo_dom_document_get_elements_by_tag_name)
- PHP_FALIAS(importNode, dom_document_import_node, arginfo_dom_document_import_node)
- PHP_FALIAS(createElementNS, dom_document_create_element_ns, arginfo_dom_document_create_element_ns)
- PHP_FALIAS(createAttributeNS, dom_document_create_attribute_ns, arginfo_dom_document_create_attribute_ns)
- PHP_FALIAS(getElementsByTagNameNS, dom_document_get_elements_by_tag_name_ns, arginfo_dom_document_get_elements_by_tag_name_ns)
- PHP_FALIAS(getElementById, dom_document_get_element_by_id, arginfo_dom_document_get_element_by_id)
- PHP_FALIAS(adoptNode, dom_document_adopt_node, arginfo_dom_document_adopt_node)
- PHP_FALIAS(normalizeDocument, dom_document_normalize_document, arginfo_dom_document_normalize_document)
- PHP_ME(domdocument, load, arginfo_dom_document_load, ZEND_ACC_PUBLIC)
- PHP_FALIAS(save, dom_document_save, arginfo_dom_document_save)
- PHP_ME(domdocument, loadXML, arginfo_dom_document_loadxml, ZEND_ACC_PUBLIC)
- PHP_FALIAS(saveXML, dom_document_savexml, arginfo_dom_document_savexml)
- PHP_ME(domdocument, __construct, arginfo_dom_document_construct, ZEND_ACC_PUBLIC)
- PHP_FALIAS(validate, dom_document_validate, arginfo_dom_document_validate)
- PHP_FALIAS(xinclude, dom_document_xinclude, arginfo_dom_document_xinclude)
+ PHP_FALIAS(createElement, dom_document_create_element, arginfo_class_DOMDocument_createElement)
+ PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, arginfo_class_DOMDocument_createDocumentFragment)
+ PHP_FALIAS(createTextNode, dom_document_create_text_node, arginfo_class_DOMDocument_createTextNode)
+ PHP_FALIAS(createComment, dom_document_create_comment, arginfo_class_DOMDocument_createComment)
+ PHP_FALIAS(createCDATASection, dom_document_create_cdatasection, arginfo_class_DOMDocument_createCDATASection)
+ PHP_FALIAS(createProcessingInstruction, dom_document_create_processing_instruction, arginfo_class_DOMDocument_createProcessingInstruction)
+ PHP_FALIAS(createAttribute, dom_document_create_attribute, arginfo_class_DOMDocument_createAttribute)
+ PHP_FALIAS(createEntityReference, dom_document_create_entity_reference, arginfo_class_DOMDocument_createEntityReference)
+ PHP_FALIAS(getElementsByTagName, dom_document_get_elements_by_tag_name, arginfo_class_DOMDocument_getElementsByTagName)
+ PHP_FALIAS(importNode, dom_document_import_node, arginfo_class_DOMDocument_importNode)
+ PHP_FALIAS(createElementNS, dom_document_create_element_ns, arginfo_class_DOMDocument_createElementNS)
+ PHP_FALIAS(createAttributeNS, dom_document_create_attribute_ns, arginfo_class_DOMDocument_createAttributeNS)
+ PHP_FALIAS(getElementsByTagNameNS, dom_document_get_elements_by_tag_name_ns, arginfo_class_DOMDocument_getElementsByTagNameNS)
+ PHP_FALIAS(getElementById, dom_document_get_element_by_id, arginfo_class_DOMDocument_getElementById)
+ PHP_FALIAS(adoptNode, dom_document_adopt_node, arginfo_class_DOMDocument_adoptNode)
+ PHP_FALIAS(normalizeDocument, dom_document_normalize_document, arginfo_class_DOMDocument_normalizeDocument)
+ PHP_ME(domdocument, load, arginfo_class_DOMDocument_load, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(save, dom_document_save, arginfo_class_DOMDocument_save)
+ PHP_ME(domdocument, loadXML, arginfo_class_DOMDocument_loadXML, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(saveXML, dom_document_savexml, arginfo_class_DOMDocument_saveXML)
+ PHP_ME(domdocument, __construct, arginfo_class_DOMDocument___construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(validate, dom_document_validate, arginfo_class_DOMDocument_validate)
+ PHP_FALIAS(xinclude, dom_document_xinclude, arginfo_class_DOMDocument_xinclude)
#if defined(LIBXML_HTML_ENABLED)
- PHP_ME(domdocument, loadHTML, arginfo_dom_document_loadhtml, ZEND_ACC_PUBLIC)
- PHP_ME(domdocument, loadHTMLFile, arginfo_dom_document_loadhtmlfile, ZEND_ACC_PUBLIC)
- PHP_FALIAS(saveHTML, dom_document_save_html, arginfo_dom_document_savehtml)
- PHP_FALIAS(saveHTMLFile, dom_document_save_html_file, arginfo_dom_document_savehtmlfile)
+ PHP_ME(domdocument, loadHTML, arginfo_class_DOMDocument_loadHTML, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocument, loadHTMLFile, arginfo_class_DOMDocument_loadHTMLFile, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(saveHTML, dom_document_save_html, arginfo_class_DOMDocument_saveHTML)
+ PHP_FALIAS(saveHTMLFile, dom_document_save_html_file, arginfo_class_DOMDocument_saveHTMLFile)
#endif /* defined(LIBXML_HTML_ENABLED) */
#if defined(LIBXML_SCHEMAS_ENABLED)
- PHP_FALIAS(schemaValidate, dom_document_schema_validate_file, arginfo_dom_document_schema_validate_file)
- PHP_FALIAS(schemaValidateSource, dom_document_schema_validate_xml, arginfo_dom_document_schema_validate_xml)
- PHP_FALIAS(relaxNGValidate, dom_document_relaxNG_validate_file, arginfo_dom_document_relaxNG_validate_file)
- PHP_FALIAS(relaxNGValidateSource, dom_document_relaxNG_validate_xml, arginfo_dom_document_relaxNG_validate_xml)
+ PHP_FALIAS(schemaValidate, dom_document_schema_validate_file, arginfo_class_DOMDocument_schemaValidate)
+ PHP_FALIAS(schemaValidateSource, dom_document_schema_validate_xml, arginfo_class_DOMDocument_schemaValidateSource)
+ PHP_FALIAS(relaxNGValidate, dom_document_relaxNG_validate_file, arginfo_class_DOMDocument_relaxNGValidate)
+ PHP_FALIAS(relaxNGValidateSource, dom_document_relaxNG_validate_xml, arginfo_class_DOMDocument_relaxNGValidateSource)
#endif
- PHP_ME(domdocument, registerNodeClass, arginfo_dom_document_registernodeclass, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocument, registerNodeClass, arginfo_class_DOMDocument_registerNodeClass, ZEND_ACC_PUBLIC)
PHP_FE_END
};
/* }}} */
@@ -1228,7 +1089,13 @@ Since: DOM Level 3
*/
PHP_FUNCTION(dom_document_adopt_node)
{
- DOM_NOT_IMPLEMENTED();
+ zval *nodep = NULL;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &nodep, dom_node_class_entry) == FAILURE) {
+ return;
+ }
+
+ DOM_NOT_IMPLEMENTED();
}
/* }}} end dom_document_adopt_node */
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c
index dab8dd7185..f92025589c 100644
--- a/ext/dom/documentfragment.c
+++ b/ext/dom/documentfragment.c
@@ -22,15 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_construct, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_documentfragement_appendXML, 0, 0, 1)
- ZEND_ARG_INFO(0, data)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMDocumentFragment extends DOMNode
@@ -40,8 +32,8 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_documentfragment_class_functions[] = {
- PHP_ME(domdocumentfragment, __construct, arginfo_dom_documentfragement_construct, ZEND_ACC_PUBLIC)
- PHP_ME(domdocumentfragment, appendXML, arginfo_dom_documentfragement_appendXML, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocumentfragment, __construct, arginfo_class_DOMDocumentFragment___construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domdocumentfragment, appendXML, arginfo_class_DOMDocumentFragment_appendXML, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/dom.stub.php b/ext/dom/dom.stub.php
new file mode 100644
index 0000000000..36b478b73c
--- /dev/null
+++ b/ext/dom/dom.stub.php
@@ -0,0 +1,330 @@
+<?php
+
+class DOMNode {
+ /** @return DOMNode|false */
+ public function appendChild(DOMNode $newChild) {}
+
+ /** @return string|false */
+ public function C14N(bool $exclusive = false, bool $with_comments = false, ?array $xpath = null, ?array $ns_prefixes = null) {}
+
+ /** @return int|false */
+ public function C14NFile(string $uri, bool $exclusive = false, bool $with_comments = false, ?array $xpath = null, ?array $ns_prefixes = null) {}
+
+ /** @return DOMNode|false */
+ public function cloneNode(bool $recursive = false) {}
+
+ /** @return int */
+ public function getLineNo() {}
+
+ /** @return ?string */
+ public function getNodePath() {}
+
+ /** @return bool */
+ public function hasAttributes() {}
+
+ /** @return bool */
+ public function hasChildNodes() {}
+
+ /** @return DOMNode|false */
+ public function insertBefore(DOMNode $newChild, ?DOMNode $refChild = null) {}
+
+ /** @return bool */
+ public function isDefaultNamespace(string $namespaceURI) {}
+
+ /** @return bool */
+ public function isSameNode(DOMNode $other) {}
+
+ /** @return bool */
+ public function isSupported(string $feature, string $version) {}
+
+ /** @return ?string */
+ public function lookupNamespaceUri(?string $prefix) {}
+
+ /** @return ?string */
+ public function lookupPrefix(string $namespaceURI) {}
+
+ /** @return void */
+ public function normalize() {}
+
+ /** @return DOMNode|false */
+ public function removeChild(DOMNode $oldChild) {}
+
+ /** @return DOMNode|false */
+ public function replaceChild(DOMNode $newChild, DOMNode $oldChild) {}
+}
+
+class DOMAttr {
+ public function __construct(string $name, string $value = "") {}
+ /** @return bool */
+ public function isId() {}
+}
+
+class DOMCdataSection {
+ public function __construct(string $value) {}
+}
+
+class DOMCharacterData {
+ /** @return bool */
+ public function appendData(string $data) {}
+
+ /** @return string|false */
+ public function substringData(int $offset, int $count) {}
+
+ /** @return bool */
+ public function insertData(int $offset, string $data) {}
+
+ /** @return bool */
+ public function deleteData(int $offset, int $count) {}
+
+ /** @return bool */
+ public function replaceData(int $offset, int $count, string $data) {}
+}
+
+class DOMComment {
+ public function __construct(string $value = "") {}
+}
+
+class DOMDocument {
+ public function __construct(string $version = "1.0", string $encoding = UNKNOWN) {}
+
+ /** @return DOMAttr|false */
+ public function createAttribute(string $name) {}
+
+ /** @return DOMAttr|false */
+ public function createAttributeNS(?string $namespaceURI, string $qualifiedName) {}
+
+ /** @return DOMCdataSection|false */
+ public function createCDATASection(string $data) {}
+
+ /** @return DOMComment|false */
+ public function createComment(string $data) {}
+
+ /** @return DOMDocumentFragment|false */
+ public function createDocumentFragment() {}
+
+ /** @return DOMElement|false */
+ public function createElement(string $tagName, string $value = "") {}
+
+ /** @return DOMElement|false */
+ public function createElementNS(?string $namespaceURI, string $qualifiedName, string $value = "") {}
+
+ /** @return DOMEntityReference|false */
+ public function createEntityReference(string $name) {}
+
+ /** @return DOMProcessingInstruction|false */
+ public function createProcessingInstruction(string $target, string $data = "") {}
+
+ /** @return DOMText|false */
+ public function createTextNode(string $data) {}
+
+ /** @return ?DOMElement */
+ public function getElementById(string $elementId) {}
+
+ /** @return DOMNodeList */
+ public function getElementsByTagName(string $tagName) {}
+
+ /** @return DOMNodeList */
+ public function getElementsByTagNameNS(string $namespaceURI, string $localName) {}
+
+ /** @return DOMNode|false */
+ public function importNode(DOMNode $importedNode, bool $deep = false) {}
+
+ /** @return DOMDocument|bool */
+ public function load(string $filename, int $options = 0) {}
+
+ /** @return DOMDocument|bool */
+ public function loadXML(string $source, int $options = 0) {}
+
+ /** @return void */
+ public function normalizeDocument() {}
+
+ /** @return bool */
+ public function registerNodeClass(string $baseclass, ?string $extendedclass) {}
+
+ /** @return int|false */
+ public function save(string $filename, int $options = 0) {}
+
+#if defined(LIBXML_HTML_ENABLED)
+ /** @return DOMDocument|bool */
+ public function loadHTML(string $source, int $options = 0) {}
+
+ /** @return DOMDocument|bool */
+ public function loadHTMLFile(string $filename, int $options = 0) {}
+
+ /** @return string|false */
+ public function saveHTML(?DOMNode $node = null) {}
+
+ /** @return int|false */
+ public function saveHTMLFile(string $filename) {}
+#endif
+
+ /** @return string|false */
+ public function saveXML(?DOMNode $node = null, int $options = 0) {}
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ /** @return bool */
+ public function schemaValidate(string $filename, int $flags = 0) {}
+
+ /** @return bool */
+ public function schemaValidateSource(string $source, int $flags = 0) {}
+
+ /** @return bool */
+ public function relaxNGValidate(string $filename) {}
+
+ /** @return bool */
+ public function relaxNGValidateSource(string $source) {}
+#endif
+
+ /** @return bool */
+ public function validate() {}
+
+ /** @return int|false */
+ public function xinclude(int $options = 0) {}
+
+ /** @return DOMNode|false */
+ public function adoptNode(DOMNode $source) {}
+}
+
+class DOMDocumentFragment {
+ public function __construct() {}
+
+ /** @return bool */
+ public function appendXML(string $data) {}
+}
+
+class DOMElement {
+ public function __construct(string $name, ?string $value = null, string $uri = "") {}
+
+ /** @return string */
+ public function getAttribute(string $name) {}
+
+ /** @return string */
+ public function getAttributeNS(?string $namespaceURI, string $localName) {}
+
+ /** @return DOMAttr|DOMNamespaceNode|false */
+ public function getAttributeNode(string $name) {}
+
+ /** @return DOMAttr|DOMNamespaceNode|null */
+ public function getAttributeNodeNS(?string $namespaceURI, string $localName) {}
+
+ /** @return DOMNodeList */
+ public function getElementsByTagName(string $name) {}
+
+ /** @return DOMNodeList */
+ public function getElementsByTagNameNS(string $namespaceURI, string $localName) {}
+
+ /** @return bool */
+ public function hasAttribute(string $name) {}
+
+ /** @return bool */
+ public function hasAttributeNS(?string $namespaceURI, string $localName) {}
+
+ /** @return bool */
+ public function removeAttribute(string $name) {}
+
+ /** @return DOMAttr|false */
+ public function removeAttributeNS(?string $namespaceURI, string $localName) {}
+
+ /** @return DOMAttr|false */
+ public function removeAttributeNode(string $name) {}
+
+ /** @return DOMAttr|bool */
+ public function setAttribute(string $name, string $value) {}
+
+ /** @return null|false */
+ public function setAttributeNS(?string $namespaceURI, string $localName, string $value) {}
+
+ /** @return DOMAttr|null|false */
+ public function setAttributeNode(DOMAttr $attr) {}
+
+ /** @return DOMAttr|null|false */
+ public function setAttributeNodeNS(DOMAttr $attr) {}
+
+ /** @return void */
+ public function setIdAttribute(string $name, bool $isId) {}
+
+ /** @return void */
+ public function setIdAttributeNS(string $namespaceURI, string $localName, bool $isId) {}
+
+ /** @return void */
+ public function setIdAttributeNode(DOMAttr $attr, bool $isId) {}
+}
+
+class DOMEntityReference {
+ public function __construct(string $name) {}
+}
+
+class DOMImplementation {
+ public function getFeature(string $feature, string $version) {}
+
+ /** @return bool */
+ public function hasFeature(string $feature, string $version) {}
+
+ /** @return DOMDocumentType|false */
+ public function createDocumentType($qualifiedName, $publicId, $systemId) {}
+
+ /** @return DOMDocument|false */
+ public function createDocument(string $namespaceURI = "", string $qualifiedName = "", DOMDocumentType $doctype = UNKNOWN) {}
+}
+
+class DOMNamedNodeMap {
+ /** @return ?DOMNode */
+ public function getNamedItem(string $name) {}
+
+ /** @return ?DOMNode */
+ public function getNamedItemNS(?string $namespaceURI, string $localName) {}
+
+ /** @return ?DOMNode */
+ public function item(int $index) {}
+
+ /** @return int|false */
+ public function count() {}
+}
+
+class DOMNodeList {
+ /** @return int|false */
+ public function count() {}
+
+ /** @return ?DOMNode */
+ public function item(int $index) {}
+}
+
+class DOMProcessingInstruction {
+ public function __construct(string $name, string $value = "") {}
+}
+
+class DOMText {
+ public function __construct(string $value = "") {}
+
+ /** @return bool */
+ public function isWhitespaceInElementContent() {}
+
+ /** @return bool */
+ public function isElementContentWhitespace() {}
+
+ /** @return DOMText|false */
+ public function splitText(int $offset) {}
+}
+
+#if defined(LIBXML_XPATH_ENABLED)
+class DOMXPath {
+ public function __construct(DOMDocument $doc, bool $registerNodeNS = true) {}
+
+ /** @return mixed */
+ public function evaluate(string $expr, ?DOMNode $context = null, bool $registerNodeNS = true) {}
+
+ /** @return mixed */
+ public function query(string $expr, ?DOMNode $context = null, bool $registerNodeNS = true) {}
+
+ /** @return bool */
+ public function registerNamespace(string $prefix, string $namespaceURI) {}
+
+ /** @param string|array $restrict */
+ public function registerPhpFunctions($restrict = null) {}
+}
+#endif
+
+class DOMDocumentType {
+}
+
+function dom_import_simplexml(object $node): ?DOMElement {}
diff --git a/ext/dom/dom_arginfo.h b/ext/dom/dom_arginfo.h
new file mode 100644
index 0000000000..6e58060bd8
--- /dev/null
+++ b/ext/dom/dom_arginfo.h
@@ -0,0 +1,397 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_appendChild, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14N, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1)
+ ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_C14NFile, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, exclusive, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, with_comments, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, xpath, IS_ARRAY, 1)
+ ZEND_ARG_TYPE_INFO(0, ns_prefixes, IS_ARRAY, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_cloneNode, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, recursive, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_getLineNo, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMNode_getNodePath arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMNode_hasAttributes arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMNode_hasChildNodes arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_insertBefore, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ ZEND_ARG_OBJ_INFO(0, refChild, DOMNode, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_isDefaultNamespace, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_isSameNode, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, other, DOMNode, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_isSupported, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, feature, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_lookupNamespaceUri, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMNode_lookupPrefix arginfo_class_DOMNode_isDefaultNamespace
+
+#define arginfo_class_DOMNode_normalize arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_removeChild, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNode_replaceChild, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
+ ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMAttr___construct, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMAttr_isId arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMCdataSection___construct, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMCharacterData_appendData, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMCharacterData_substringData, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMCharacterData_insertData, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMCharacterData_deleteData arginfo_class_DOMCharacterData_substringData
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMCharacterData_replaceData, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMComment___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, version, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createAttribute, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createAttributeNS, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocument_createCDATASection arginfo_class_DOMCharacterData_appendData
+
+#define arginfo_class_DOMDocument_createComment arginfo_class_DOMCharacterData_appendData
+
+#define arginfo_class_DOMDocument_createDocumentFragment arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElement, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, tagName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createElementNS, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocument_createEntityReference arginfo_class_DOMDocument_createAttribute
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_createProcessingInstruction, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, target, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocument_createTextNode arginfo_class_DOMCharacterData_appendData
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_getElementById, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, elementId, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_getElementsByTagName, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, tagName, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_getElementsByTagNameNS, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_importNode, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, importedNode, DOMNode, 0)
+ ZEND_ARG_TYPE_INFO(0, deep, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_load, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadXML, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocument_normalizeDocument arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_registerNodeClass, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, baseclass, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, extendedclass, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocument_save arginfo_class_DOMDocument_load
+
+#if defined(LIBXML_HTML_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTML, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTMLFile, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveHTML, 0, 0, 0)
+ ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveHTMLFile, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_saveXML, 0, 0, 0)
+ ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidate, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_schemaValidateSource, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_relaxNGValidate, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_relaxNGValidateSource, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#define arginfo_class_DOMDocument_validate arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_xinclude, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_adoptNode, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, source, DOMNode, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMDocumentFragment___construct arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMDocumentFragment_appendXML arginfo_class_DOMCharacterData_appendData
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement___construct, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMElement_getAttribute arginfo_class_DOMDocument_createAttribute
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_getAttributeNS, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMElement_getAttributeNode arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMElement_getAttributeNodeNS arginfo_class_DOMElement_getAttributeNS
+
+#define arginfo_class_DOMElement_getElementsByTagName arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMElement_getElementsByTagNameNS arginfo_class_DOMDocument_getElementsByTagNameNS
+
+#define arginfo_class_DOMElement_hasAttribute arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMElement_hasAttributeNS arginfo_class_DOMElement_getAttributeNS
+
+#define arginfo_class_DOMElement_removeAttribute arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMElement_removeAttributeNS arginfo_class_DOMElement_getAttributeNS
+
+#define arginfo_class_DOMElement_removeAttributeNode arginfo_class_DOMDocument_createAttribute
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setAttribute, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setAttributeNS, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setAttributeNode, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, attr, DOMAttr, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMElement_setAttributeNodeNS arginfo_class_DOMElement_setAttributeNode
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setIdAttribute, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, isId, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setIdAttributeNS, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, isId, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_setIdAttributeNode, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, attr, DOMAttr, 0)
+ ZEND_ARG_TYPE_INFO(0, isId, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMEntityReference___construct arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMImplementation_getFeature arginfo_class_DOMNode_isSupported
+
+#define arginfo_class_DOMImplementation_hasFeature arginfo_class_DOMNode_isSupported
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0, 3)
+ ZEND_ARG_INFO(0, qualifiedName)
+ ZEND_ARG_INFO(0, publicId)
+ ZEND_ARG_INFO(0, systemId)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocument, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
+ ZEND_ARG_OBJ_INFO(0, doctype, DOMDocumentType, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMNamedNodeMap_getNamedItem arginfo_class_DOMDocument_createAttribute
+
+#define arginfo_class_DOMNamedNodeMap_getNamedItemNS arginfo_class_DOMElement_getAttributeNS
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMNamedNodeMap_item, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_DOMNamedNodeMap_count arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMNodeList_count arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMNodeList_item arginfo_class_DOMNamedNodeMap_item
+
+#define arginfo_class_DOMProcessingInstruction___construct arginfo_class_DOMAttr___construct
+
+#define arginfo_class_DOMText___construct arginfo_class_DOMComment___construct
+
+#define arginfo_class_DOMText_isWhitespaceInElementContent arginfo_class_DOMNode_getLineNo
+
+#define arginfo_class_DOMText_isElementContentWhitespace arginfo_class_DOMNode_getLineNo
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMText_splitText, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#if defined(LIBXML_XPATH_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath___construct, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+ ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_evaluate, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, expr, IS_STRING, 0)
+ ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
+ ZEND_ARG_TYPE_INFO(0, registerNodeNS, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#define arginfo_class_DOMXPath_query arginfo_class_DOMXPath_evaluate
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_registerNamespace, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMXPath_registerPhpFunctions, 0, 0, 0)
+ ZEND_ARG_INFO(0, restrict)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
+ ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
+ZEND_END_ARG_INFO()
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index abbda2699e..094fcd4373 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -22,28 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_get_feature, 0, 0, 2)
- ZEND_ARG_INFO(0, feature)
- ZEND_ARG_INFO(0, version)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_has_feature, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_create_documenttype, 0, 0, 3)
- ZEND_ARG_INFO(0, qualifiedName)
- ZEND_ARG_INFO(0, publicId)
- ZEND_ARG_INFO(0, systemId)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_implementation_create_document, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, qualifiedName)
- ZEND_ARG_OBJ_INFO(0, docType, DOMDocumentType, 0)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMImplementation
@@ -53,10 +32,10 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_domimplementation_class_functions[] = {
- PHP_ME(domimplementation, getFeature, arginfo_dom_implementation_get_feature, ZEND_ACC_PUBLIC)
- PHP_ME(domimplementation, hasFeature, arginfo_dom_implementation_has_feature, ZEND_ACC_PUBLIC)
- PHP_ME(domimplementation, createDocumentType, arginfo_dom_implementation_create_documenttype, ZEND_ACC_PUBLIC)
- PHP_ME(domimplementation, createDocument, arginfo_dom_implementation_create_document, ZEND_ACC_PUBLIC)
+ PHP_ME(domimplementation, getFeature, arginfo_class_DOMImplementation_getFeature, ZEND_ACC_PUBLIC)
+ PHP_ME(domimplementation, hasFeature, arginfo_class_DOMImplementation_hasFeature, ZEND_ACC_PUBLIC)
+ PHP_ME(domimplementation, createDocumentType, arginfo_class_DOMImplementation_createDocumentType, ZEND_ACC_PUBLIC)
+ PHP_ME(domimplementation, createDocument, arginfo_class_DOMImplementation_createDocument, ZEND_ACC_PUBLIC)
PHP_FE_END
};
@@ -94,7 +73,7 @@ PHP_METHOD(domimplementation, createDocumentType)
xmlChar *pch1 = NULL, *pch2 = NULL, *localname = NULL;
xmlURIPtr uri;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sss", &name, &name_len, &publicid, &publicid_len, &systemid, &systemid_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ss", &name, &name_len, &publicid, &publicid_len, &systemid, &systemid_len) == FAILURE) {
return;
}
@@ -160,7 +139,7 @@ PHP_METHOD(domimplementation, createDocument)
char *prefix = NULL, *localname = NULL;
dom_object *doctobj;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ssO", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ssO!", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) {
return;
}
@@ -254,7 +233,14 @@ Since: DOM Level 3
*/
PHP_METHOD(domimplementation, getFeature)
{
- DOM_NOT_IMPLEMENTED();
+ size_t feature_len, version_len;
+ char *feature, *version;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &feature, &feature_len, &version, &version_len) == FAILURE) {
+ return;
+ }
+
+ DOM_NOT_IMPLEMENTED();
}
/* }}} end dom_domimplementation_get_feature */
diff --git a/ext/dom/element.c b/ext/dom/element.c
index b46b2ea0af..f064ea9c38 100644
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@ -22,98 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute, 0, 0, 2)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_node, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_node, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, newAttr, DOMAttr, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute_node, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, oldAttr, DOMAttr, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_elements_by_tag_name, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_ns, 0, 0, 3)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, qualifiedName)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_remove_attribute_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_attribute_node_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_attribute_node_ns, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, newAttr, DOMAttr, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_get_elements_by_tag_name_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_has_attribute, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_has_attribute_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute, 0, 0, 2)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, isId)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute_ns, 0, 0, 3)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
- ZEND_ARG_INFO(0, isId)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_set_id_attribute_node, 0, 0, 2)
- ZEND_ARG_OBJ_INFO(0, attr, DOMAttr, 0)
- ZEND_ARG_INFO(0, isId)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_element_construct, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
- ZEND_ARG_INFO(0, uri)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMElement extends DOMNode
@@ -123,25 +32,25 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_element_class_functions[] = { /* {{{ */
- PHP_FALIAS(getAttribute, dom_element_get_attribute, arginfo_dom_element_get_attribute)
- PHP_FALIAS(setAttribute, dom_element_set_attribute, arginfo_dom_element_set_attribute)
- PHP_FALIAS(removeAttribute, dom_element_remove_attribute, arginfo_dom_element_remove_attribute)
- PHP_FALIAS(getAttributeNode, dom_element_get_attribute_node, arginfo_dom_element_get_attribute_node)
- PHP_FALIAS(setAttributeNode, dom_element_set_attribute_node, arginfo_dom_element_set_attribute_node)
- PHP_FALIAS(removeAttributeNode, dom_element_remove_attribute_node, arginfo_dom_element_remove_attribute_node)
- PHP_FALIAS(getElementsByTagName, dom_element_get_elements_by_tag_name, arginfo_dom_element_get_elements_by_tag_name)
- PHP_FALIAS(getAttributeNS, dom_element_get_attribute_ns, arginfo_dom_element_get_attribute_ns)
- PHP_FALIAS(setAttributeNS, dom_element_set_attribute_ns, arginfo_dom_element_set_attribute_ns)
- PHP_FALIAS(removeAttributeNS, dom_element_remove_attribute_ns, arginfo_dom_element_remove_attribute_ns)
- PHP_FALIAS(getAttributeNodeNS, dom_element_get_attribute_node_ns, arginfo_dom_element_get_attribute_node_ns)
- PHP_FALIAS(setAttributeNodeNS, dom_element_set_attribute_node_ns, arginfo_dom_element_set_attribute_node_ns)
- PHP_FALIAS(getElementsByTagNameNS, dom_element_get_elements_by_tag_name_ns, arginfo_dom_element_get_elements_by_tag_name_ns)
- PHP_FALIAS(hasAttribute, dom_element_has_attribute, arginfo_dom_element_has_attribute)
- PHP_FALIAS(hasAttributeNS, dom_element_has_attribute_ns, arginfo_dom_element_has_attribute_ns)
- PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, arginfo_dom_element_set_id_attribute)
- PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, arginfo_dom_element_set_id_attribute_ns)
- PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, arginfo_dom_element_set_id_attribute_node)
- PHP_ME(domelement, __construct, arginfo_dom_element_construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(getAttribute, dom_element_get_attribute, arginfo_class_DOMElement_getAttribute)
+ PHP_FALIAS(setAttribute, dom_element_set_attribute, arginfo_class_DOMElement_setAttribute)
+ PHP_FALIAS(removeAttribute, dom_element_remove_attribute, arginfo_class_DOMElement_removeAttribute)
+ PHP_FALIAS(getAttributeNode, dom_element_get_attribute_node, arginfo_class_DOMElement_getAttributeNode)
+ PHP_FALIAS(setAttributeNode, dom_element_set_attribute_node, arginfo_class_DOMElement_setAttributeNode)
+ PHP_FALIAS(removeAttributeNode, dom_element_remove_attribute_node, arginfo_class_DOMElement_removeAttributeNode)
+ PHP_FALIAS(getElementsByTagName, dom_element_get_elements_by_tag_name, arginfo_class_DOMElement_getElementsByTagName)
+ PHP_FALIAS(getAttributeNS, dom_element_get_attribute_ns, arginfo_class_DOMElement_getAttributeNS)
+ PHP_FALIAS(setAttributeNS, dom_element_set_attribute_ns, arginfo_class_DOMElement_setAttributeNS)
+ PHP_FALIAS(removeAttributeNS, dom_element_remove_attribute_ns, arginfo_class_DOMElement_removeAttributeNS)
+ PHP_FALIAS(getAttributeNodeNS, dom_element_get_attribute_node_ns, arginfo_class_DOMElement_getAttributeNodeNS)
+ PHP_FALIAS(setAttributeNodeNS, dom_element_set_attribute_node_ns, arginfo_class_DOMElement_setAttributeNodeNS)
+ PHP_FALIAS(getElementsByTagNameNS, dom_element_get_elements_by_tag_name_ns, arginfo_class_DOMElement_getElementsByTagNameNS)
+ PHP_FALIAS(hasAttribute, dom_element_has_attribute, arginfo_class_DOMElement_hasAttribute)
+ PHP_FALIAS(hasAttributeNS, dom_element_has_attribute_ns, arginfo_class_DOMElement_hasAttributeNS)
+ PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, arginfo_class_DOMElement_setIdAttribute)
+ PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, arginfo_class_DOMElement_setIdAttributeNS)
+ PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, arginfo_class_DOMElement_setIdAttributeNode)
+ PHP_ME(domelement, __construct, arginfo_class_DOMElement___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
/* }}} */
diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c
index 479d99d88e..a8d73f42f7 100644
--- a/ext/dom/entityreference.c
+++ b/ext/dom/entityreference.c
@@ -22,12 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_entityreference_construct, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMEntityReference extends DOMNode
@@ -37,7 +32,7 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_entityreference_class_functions[] = {
- PHP_ME(domentityreference, __construct, arginfo_dom_entityreference_construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domentityreference, __construct, arginfo_class_DOMEntityReference___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c
index 613cea3360..8553a527f0 100644
--- a/ext/dom/namednodemap.c
+++ b/ext/dom/namednodemap.c
@@ -22,24 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_get_named_item, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_item, 0, 0, 0)
- ZEND_ARG_INFO(0, index)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_get_named_item_ns, 0, 0, 0)
- ZEND_ARG_INFO(0, namespaceURI)
- ZEND_ARG_INFO(0, localName)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_namednodemap_count, 0, 0, 0)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMNamedNodeMap
@@ -49,10 +32,10 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_namednodemap_class_functions[] = { /* {{{ */
- PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, arginfo_dom_namednodemap_get_named_item)
- PHP_FALIAS(item, dom_namednodemap_item, arginfo_dom_namednodemap_item)
- PHP_FALIAS(getNamedItemNS, dom_namednodemap_get_named_item_ns, arginfo_dom_namednodemap_get_named_item_ns)
- PHP_FALIAS(count, dom_namednodemap_count, arginfo_dom_namednodemap_count)
+ PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, arginfo_class_DOMNamedNodeMap_getNamedItem)
+ PHP_FALIAS(item, dom_namednodemap_item, arginfo_class_DOMNamedNodeMap_item)
+ PHP_FALIAS(getNamedItemNS, dom_namednodemap_get_named_item_ns, arginfo_class_DOMNamedNodeMap_getNamedItemNS)
+ PHP_FALIAS(count, dom_namednodemap_count, arginfo_class_DOMNamedNodeMap_count)
PHP_FE_END
};
/* }}} */
diff --git a/ext/dom/node.c b/ext/dom/node.c
index c15868a9ae..5cc21be5ac 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -22,85 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_insert_before, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
- ZEND_ARG_OBJ_INFO(0, refChild, DOMNode, 1)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_replace_child, 0, 0, 2)
- ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
- ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_remove_child, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, oldChild, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_append_child, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, newChild, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_child_nodes, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 0)
- ZEND_ARG_INFO(0, deep)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_normalize, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_supported, 0, 0, 2)
- ZEND_ARG_INFO(0, feature)
- ZEND_ARG_INFO(0, version)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_attributes, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_compare_document_position, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, other, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_same_node, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, other, DOMNode, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_lookup_prefix, 0, 0, 1)
- ZEND_ARG_INFO(0, namespaceURI)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_is_default_namespace, 0, 0, 1)
- ZEND_ARG_INFO(0, namespaceURI)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_lookup_namespace_uri, 0, 0, 1)
- ZEND_ARG_INFO(0, prefix)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_getNodePath, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_getLineNo, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_C14N, 0, 0, 0)
- ZEND_ARG_INFO(0, exclusive)
- ZEND_ARG_INFO(0, with_comments)
- ZEND_ARG_ARRAY_INFO(0, xpath, 1)
- ZEND_ARG_ARRAY_INFO(0, ns_prefixes, 1)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_C14NFile, 0, 0, 1)
- ZEND_ARG_INFO(0, uri)
- ZEND_ARG_INFO(0, exclusive)
- ZEND_ARG_INFO(0, with_comments)
- ZEND_ARG_ARRAY_INFO(0, xpath, 1)
- ZEND_ARG_ARRAY_INFO(0, ns_prefixes, 1)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMNode
@@ -110,24 +32,23 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_node_class_functions[] = { /* {{{ */
- PHP_FALIAS(insertBefore, dom_node_insert_before, arginfo_dom_node_insert_before)
- PHP_FALIAS(replaceChild, dom_node_replace_child, arginfo_dom_node_replace_child)
- PHP_FALIAS(removeChild, dom_node_remove_child, arginfo_dom_node_remove_child)
- PHP_FALIAS(appendChild, dom_node_append_child, arginfo_dom_node_append_child)
- PHP_FALIAS(hasChildNodes, dom_node_has_child_nodes, arginfo_dom_node_has_child_nodes)
- PHP_FALIAS(cloneNode, dom_node_clone_node, arginfo_dom_node_clone_node)
- PHP_FALIAS(normalize, dom_node_normalize, arginfo_dom_node_normalize)
- PHP_FALIAS(isSupported, dom_node_is_supported, arginfo_dom_node_is_supported)
- PHP_FALIAS(hasAttributes, dom_node_has_attributes, arginfo_dom_node_has_attributes)
- PHP_FALIAS(compareDocumentPosition, dom_node_compare_document_position, arginfo_dom_node_compare_document_position)
- PHP_FALIAS(isSameNode, dom_node_is_same_node, arginfo_dom_node_is_same_node)
- PHP_FALIAS(lookupPrefix, dom_node_lookup_prefix, arginfo_dom_node_lookup_prefix)
- PHP_FALIAS(isDefaultNamespace, dom_node_is_default_namespace, arginfo_dom_node_is_default_namespace)
- PHP_FALIAS(lookupNamespaceUri, dom_node_lookup_namespace_uri, arginfo_dom_node_lookup_namespace_uri)
- PHP_ME(domnode, getNodePath, arginfo_dom_node_getNodePath, ZEND_ACC_PUBLIC)
- PHP_ME(domnode, getLineNo, arginfo_dom_node_getLineNo, ZEND_ACC_PUBLIC)
- PHP_ME(domnode, C14N, arginfo_dom_node_C14N, ZEND_ACC_PUBLIC)
- PHP_ME(domnode, C14NFile, arginfo_dom_node_C14NFile, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(insertBefore, dom_node_insert_before, arginfo_class_DOMNode_insertBefore)
+ PHP_FALIAS(replaceChild, dom_node_replace_child, arginfo_class_DOMNode_replaceChild)
+ PHP_FALIAS(removeChild, dom_node_remove_child, arginfo_class_DOMNode_removeChild)
+ PHP_FALIAS(appendChild, dom_node_append_child, arginfo_class_DOMNode_appendChild)
+ PHP_FALIAS(hasChildNodes, dom_node_has_child_nodes, arginfo_class_DOMNode_hasChildNodes)
+ PHP_FALIAS(cloneNode, dom_node_clone_node, arginfo_class_DOMNode_cloneNode)
+ PHP_FALIAS(normalize, dom_node_normalize, arginfo_class_DOMNode_normalize)
+ PHP_FALIAS(isSupported, dom_node_is_supported, arginfo_class_DOMNode_isSupported)
+ PHP_FALIAS(hasAttributes, dom_node_has_attributes, arginfo_class_DOMNode_hasAttributes)
+ PHP_FALIAS(isSameNode, dom_node_is_same_node, arginfo_class_DOMNode_isSameNode)
+ PHP_FALIAS(lookupPrefix, dom_node_lookup_prefix, arginfo_class_DOMNode_lookupPrefix)
+ PHP_FALIAS(isDefaultNamespace, dom_node_is_default_namespace, arginfo_class_DOMNode_isDefaultNamespace)
+ PHP_FALIAS(lookupNamespaceUri, dom_node_lookup_namespace_uri, arginfo_class_DOMNode_lookupNamespaceUri)
+ PHP_ME(domnode, getNodePath, arginfo_class_DOMNode_getNodePath, ZEND_ACC_PUBLIC)
+ PHP_ME(domnode, getLineNo, arginfo_class_DOMNode_getLineNo, ZEND_ACC_PUBLIC)
+ PHP_ME(domnode, C14N, arginfo_class_DOMNode_C14N, ZEND_ACC_PUBLIC)
+ PHP_ME(domnode, C14NFile, arginfo_class_DOMNode_C14NFile, ZEND_ACC_PUBLIC)
PHP_FE_END
};
/* }}} */
@@ -1471,16 +1392,6 @@ PHP_FUNCTION(dom_node_has_attributes)
}
/* }}} end dom_node_has_attributes */
-/* {{{ proto short dom_node_compare_document_position(DomNode other);
-URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition
-Since: DOM Level 3
-*/
-PHP_FUNCTION(dom_node_compare_document_position)
-{
- DOM_NOT_IMPLEMENTED();
-}
-/* }}} end dom_node_compare_document_position */
-
/* {{{ proto bool dom_node_is_same_node(DomNode other);
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode
Since: DOM Level 3
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index 4c6967ffce..f95c864fa3 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -22,18 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_nodelist_item, 0, 0, 1)
- ZEND_ARG_INFO(0, index)
-ZEND_END_ARG_INFO();
-/* }}} */
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_nodelist_count, 0, 0, 0)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMNodeList
@@ -43,8 +32,8 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_nodelist_class_functions[] = {
- PHP_FALIAS(item, dom_nodelist_item, arginfo_dom_nodelist_item)
- PHP_FALIAS(count, dom_nodelist_count, arginfo_dom_nodelist_count)
+ PHP_FALIAS(item, dom_nodelist_item, arginfo_class_DOMNodeList_item)
+ PHP_FALIAS(count, dom_nodelist_count, arginfo_class_DOMNodeList_count)
PHP_FE_END
};
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index cdde529e2f..b3a6b45ba9 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -24,6 +24,7 @@
#if HAVE_LIBXML && HAVE_DOM
#include "ext/standard/php_rand.h"
#include "php_dom.h"
+#include "dom_arginfo.h"
#include "dom_properties.h"
#include "zend_interfaces.h"
@@ -516,12 +517,6 @@ static void dom_dtor_prop_handler(zval *zv) /* {{{ */
free(Z_PTR_P(zv));
}
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_import_simplexml, 0, 0, 1)
- ZEND_ARG_INFO(0, node)
-ZEND_END_ARG_INFO()
-/* }}} */
-
static const zend_function_entry dom_functions[] = {
PHP_FE(dom_import_simplexml, arginfo_dom_import_simplexml)
PHP_FE_END
diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c
index 58bc3dbbc1..efdfd5ea61 100644
--- a/ext/dom/processinginstruction.c
+++ b/ext/dom/processinginstruction.c
@@ -22,14 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
-
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_processinginstruction_construct, 0, 0, 1)
- ZEND_ARG_INFO(0, name)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMProcessingInstruction extends DOMNode
@@ -39,7 +32,7 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_processinginstruction_class_functions[] = {
- PHP_ME(domprocessinginstruction, __construct, arginfo_dom_processinginstruction_construct, ZEND_ACC_PUBLIC)
+ PHP_ME(domprocessinginstruction, __construct, arginfo_class_DOMProcessingInstruction___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/tests/DOMDocument_adoptNode.phpt b/ext/dom/tests/DOMDocument_adoptNode.phpt
new file mode 100644
index 0000000000..5fc8e79d9d
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_adoptNode.phpt
@@ -0,0 +1,16 @@
+--TEST--
+DOMDocument::adoptNode not implemented
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+
+$dom = new DOMDocument();
+$dom->loadXML("<root />");
+
+$dom->adoptNode($dom->documentElement);
+?>
+--EXPECTF--
+Warning: DOMDocument::adoptNode(): Not yet implemented in %s
diff --git a/ext/dom/text.c b/ext/dom/text.c
index ee184a20c2..fa5928b062 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -23,19 +23,7 @@
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
#include "dom_ce.h"
-
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_split_text, 0, 0, 1)
- ZEND_ARG_INFO(0, offset)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_is_whitespace_in_element_content, 0, 0, 0)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_text_construct, 0, 0, 0)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
-/* }}} */
+#include "dom_arginfo.h"
/*
* class DOMText extends DOMCharacterData
@@ -45,10 +33,10 @@ ZEND_END_ARG_INFO();
*/
const zend_function_entry php_dom_text_class_functions[] = {
- PHP_FALIAS(splitText, dom_text_split_text, arginfo_dom_text_split_text)
- PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, arginfo_dom_text_is_whitespace_in_element_content)
- PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, arginfo_dom_text_is_whitespace_in_element_content)
- PHP_ME(domtext, __construct, arginfo_dom_text_construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(splitText, dom_text_split_text, arginfo_class_DOMText_splitText)
+ PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, arginfo_class_DOMText_isWhitespaceInElementContent)
+ PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, arginfo_class_DOMText_isElementContentWhitespace)
+ PHP_ME(domtext, __construct, arginfo_class_DOMText___construct, ZEND_ACC_PUBLIC)
PHP_FE_END
};
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index b2d5ef262f..219a3ea930 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -22,6 +22,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
+#include "dom_arginfo.h"
#define PHP_DOM_XPATH_QUERY 0
#define PHP_DOM_XPATH_EVALUATE 1
@@ -32,39 +33,12 @@
#if defined(LIBXML_XPATH_ENABLED)
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_construct, 0, 0, 1)
- ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
- ZEND_ARG_INFO(0, registerNodeNS)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_ns, 0, 0, 2)
- ZEND_ARG_INFO(0, prefix)
- ZEND_ARG_INFO(0, uri)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_query, 0, 0, 1)
- ZEND_ARG_INFO(0, expr)
- ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
- ZEND_ARG_INFO(0, registerNodeNS)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_evaluate, 0, 0, 1)
- ZEND_ARG_INFO(0, expr)
- ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
- ZEND_ARG_INFO(0, registerNodeNS)
-ZEND_END_ARG_INFO();
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_php_functions, 0, 0, 0)
-ZEND_END_ARG_INFO();
-/* }}} */
-
const zend_function_entry php_dom_xpath_class_functions[] = {
- PHP_ME(domxpath, __construct, arginfo_dom_xpath_construct, ZEND_ACC_PUBLIC)
- PHP_FALIAS(registerNamespace, dom_xpath_register_ns, arginfo_dom_xpath_register_ns)
- PHP_FALIAS(query, dom_xpath_query, arginfo_dom_xpath_query)
- PHP_FALIAS(evaluate, dom_xpath_evaluate, arginfo_dom_xpath_evaluate)
- PHP_FALIAS(registerPhpFunctions, dom_xpath_register_php_functions, arginfo_dom_xpath_register_php_functions)
+ PHP_ME(domxpath, __construct, arginfo_class_DOMXPath___construct, ZEND_ACC_PUBLIC)
+ PHP_FALIAS(registerNamespace, dom_xpath_register_ns, arginfo_class_DOMXPath_registerNamespace)
+ PHP_FALIAS(query, dom_xpath_query, arginfo_class_DOMXPath_query)
+ PHP_FALIAS(evaluate, dom_xpath_evaluate, arginfo_class_DOMXPath_evaluate)
+ PHP_FALIAS(registerPhpFunctions, dom_xpath_register_php_functions, arginfo_class_DOMXPath_registerPhpFunctions)
PHP_FE_END
};