summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-04-13 16:28:55 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-04-14 11:49:02 +0200
commitc5fb4f0794c6efe06f64d6d462e14357d527b564 (patch)
treec34c643b8505356beaa091904a8e8aa9d9cd4519 /ext
parent80598f12507c5cbde04163289e4d2575f05d2a0c (diff)
downloadphp-git-c5fb4f0794c6efe06f64d6d462e14357d527b564.tar.gz
Generate function entries from stubs for a couple of extensions
Migrates ext/standard, ext/tidy, ext/tokenizer, ext/xml, ext/xml_reader, and ext/xml_writer. Closes GH-5381.
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/dir.c9
-rwxr-xr-xext/standard/dir.stub.php5
-rw-r--r--ext/standard/dir_arginfo.h13
-rw-r--r--ext/standard/user_filters.c9
-rwxr-xr-xext/standard/user_filters.stub.php17
-rw-r--r--ext/standard/user_filters_arginfo.h11
-rw-r--r--ext/tidy/php_tidy.h10
-rw-r--r--ext/tidy/tidy.c191
-rw-r--r--ext/tidy/tidy.stub.php144
-rw-r--r--ext/tidy/tidy_arginfo.h163
-rw-r--r--ext/tokenizer/tokenizer.c25
-rw-r--r--ext/tokenizer/tokenizer.stub.php17
-rw-r--r--ext/tokenizer/tokenizer_arginfo.h28
-rw-r--r--ext/xml/xml.c6
-rw-r--r--ext/xml/xml.stub.php4
-rw-r--r--ext/xml/xml_arginfo.h5
-rw-r--r--ext/xmlreader/php_xmlreader.c88
-rw-r--r--ext/xmlreader/php_xmlreader.stub.php (renamed from ext/xmlreader/xmlreader.stub.php)6
-rw-r--r--ext/xmlreader/php_xmlreader_arginfo.h139
-rw-r--r--ext/xmlreader/xmlreader_arginfo.h82
-rw-r--r--ext/xmlwriter/php_xmlwriter.c229
-rw-r--r--ext/xmlwriter/php_xmlwriter.stub.php (renamed from ext/xmlwriter/xmlwriter.stub.php)46
-rw-r--r--ext/xmlwriter/php_xmlwriter_arginfo.h (renamed from ext/xmlwriter/xmlwriter_arginfo.h)140
23 files changed, 778 insertions, 609 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 0eaadac3e4..0b18c1f146 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -87,13 +87,6 @@ static zend_class_entry *dir_class_entry_ptr;
} \
}
-static const zend_function_entry php_dir_class_functions[] = {
- PHP_FALIAS(close, closedir, arginfo_class_Directory_close)
- PHP_FALIAS(rewind, rewinddir, arginfo_class_Directory_rewind)
- PHP_FALIAS(read, readdir, arginfo_class_Directory_read)
- PHP_FE_END
-};
-
static void php_set_default_dir(zend_resource *res)
{
@@ -119,7 +112,7 @@ PHP_MINIT_FUNCTION(dir)
static char dirsep_str[2], pathsep_str[2];
zend_class_entry dir_class_entry;
- INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions);
+ INIT_CLASS_ENTRY(dir_class_entry, "Directory", class_Directory_methods);
dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry);
#ifdef ZTS
diff --git a/ext/standard/dir.stub.php b/ext/standard/dir.stub.php
index 0ffef77285..39881f759b 100755
--- a/ext/standard/dir.stub.php
+++ b/ext/standard/dir.stub.php
@@ -1,22 +1,27 @@
<?php
+/** @generate-function-entries */
+
class Directory
{
/**
* @param resource $dir_handle
* @return void
+ * @alias closedir
*/
public function close($dir_handle = UNKNOWN) {}
/**
* @param resource $dir_handle
* @return void
+ * @alias rewinddir
*/
public function rewind($dir_handle = UNKNOWN) {}
/**
* @param resource $dir_handle
* @return string|false
+ * @alias readdir
*/
public function read($dir_handle = UNKNOWN) {}
}
diff --git a/ext/standard/dir_arginfo.h b/ext/standard/dir_arginfo.h
index 19a7f5e3ed..5c806faf2b 100644
--- a/ext/standard/dir_arginfo.h
+++ b/ext/standard/dir_arginfo.h
@@ -7,3 +7,16 @@ ZEND_END_ARG_INFO()
#define arginfo_class_Directory_rewind arginfo_class_Directory_close
#define arginfo_class_Directory_read arginfo_class_Directory_close
+
+
+ZEND_FUNCTION(closedir);
+ZEND_FUNCTION(rewinddir);
+ZEND_FUNCTION(readdir);
+
+
+static const zend_function_entry class_Directory_methods[] = {
+ ZEND_ME_MAPPING(close, closedir, arginfo_class_Directory_close, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(rewind, rewinddir, arginfo_class_Directory_rewind, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(read, readdir, arginfo_class_Directory_read, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index 110c374b3d..fc8fd826c8 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -43,13 +43,6 @@ PHP_FUNCTION(user_filter_nop)
{
}
-static const zend_function_entry user_filter_class_funcs[] = {
- PHP_NAMED_FE(filter, PHP_FN(user_filter_nop), arginfo_class_php_user_filter_filter)
- PHP_NAMED_FE(onCreate, PHP_FN(user_filter_nop), arginfo_class_php_user_filter_onCreate)
- PHP_NAMED_FE(onClose, PHP_FN(user_filter_nop), arginfo_class_php_user_filter_onClose)
- PHP_FE_END
-};
-
static zend_class_entry user_filter_class_entry;
static ZEND_RSRC_DTOR_FUNC(php_bucket_dtor)
@@ -65,7 +58,7 @@ PHP_MINIT_FUNCTION(user_filters)
{
zend_class_entry *php_user_filter;
/* init the filter class ancestor */
- INIT_CLASS_ENTRY(user_filter_class_entry, "php_user_filter", user_filter_class_funcs);
+ INIT_CLASS_ENTRY(user_filter_class_entry, "php_user_filter", class_php_user_filter_methods);
if ((php_user_filter = zend_register_internal_class(&user_filter_class_entry)) == NULL) {
return FAILURE;
}
diff --git a/ext/standard/user_filters.stub.php b/ext/standard/user_filters.stub.php
index 9481b0b663..8c1b7e5fe6 100755
--- a/ext/standard/user_filters.stub.php
+++ b/ext/standard/user_filters.stub.php
@@ -1,13 +1,24 @@
<?php
+/** @generate-function-entries */
+
class php_user_filter
{
- /** @return int */
+ /**
+ * @return int
+ * @alias user_filter_nop
+ */
public function filter($in, $out, &$consumed, $closing) {}
- /** @return void */
+ /**
+ * @return void
+ * @alias user_filter_nop
+ */
public function onCreate() {}
- /** @return void */
+ /**
+ * @return void
+ * @alias user_filter_nop
+ */
public function onClose() {}
}
diff --git a/ext/standard/user_filters_arginfo.h b/ext/standard/user_filters_arginfo.h
index 30e1aabb69..84cbbf3cbb 100644
--- a/ext/standard/user_filters_arginfo.h
+++ b/ext/standard/user_filters_arginfo.h
@@ -11,3 +11,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_php_user_filter_onCreate, 0, 0, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_php_user_filter_onClose arginfo_class_php_user_filter_onCreate
+
+
+ZEND_FUNCTION(user_filter_nop);
+
+
+static const zend_function_entry class_php_user_filter_methods[] = {
+ ZEND_ME_MAPPING(filter, user_filter_nop, arginfo_class_php_user_filter_filter, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(onCreate, user_filter_nop, arginfo_class_php_user_filter_onCreate, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(onClose, user_filter_nop, arginfo_class_php_user_filter_onClose, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h
index 3318497c98..ab9e90eb93 100644
--- a/ext/tidy/php_tidy.h
+++ b/ext/tidy/php_tidy.h
@@ -23,16 +23,6 @@ extern zend_module_entry tidy_module_entry;
#include "php_version.h"
#define PHP_TIDY_VERSION PHP_VERSION
-#define TIDY_METHOD_MAP(name, func_name, arg_types) \
- ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
-#define TIDY_NODE_METHOD(name) PHP_FUNCTION(tnm_ ##name)
-#define TIDY_NODE_ME(name, param) TIDY_METHOD_MAP(name, tnm_ ##name, param)
-#define TIDY_NODE_PRIVATE_ME(name, param) ZEND_NAMED_ME(name, ZEND_FN(tnm_ ##name), param, ZEND_ACC_PRIVATE)
-#define TIDY_DOC_METHOD(name) PHP_FUNCTION(tdm_ ##name)
-#define TIDY_DOC_ME(name, param) TIDY_METHOD_MAP(name, tdm_ ##name, param)
-#define TIDY_ATTR_METHOD(name) PHP_FUNCTION(tam_ ##name)
-#define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param)
-
ZEND_BEGIN_MODULE_GLOBALS(tidy)
char *default_config;
zend_bool clean_output;
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 252b97ffb4..b9f9c3502a 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -89,7 +89,7 @@
#define REGISTER_TIDY_CLASS(classname, name, parent, __flags) \
{ \
zend_class_entry ce; \
- INIT_CLASS_ENTRY(ce, # classname, tidy_funcs_ ## name); \
+ INIT_CLASS_ENTRY(ce, # classname, class_ ## classname ## _methods); \
ce.create_object = tidy_object_new_ ## name; \
tidy_ce_ ## name = zend_register_internal_class_ex(&ce, parent); \
tidy_ce_ ## name->ce_flags |= __flags; \
@@ -229,50 +229,6 @@ static PHP_MSHUTDOWN_FUNCTION(tidy);
static PHP_RINIT_FUNCTION(tidy);
static PHP_MINFO_FUNCTION(tidy);
-static PHP_FUNCTION(tidy_getopt);
-static PHP_FUNCTION(tidy_parse_string);
-static PHP_FUNCTION(tidy_parse_file);
-static PHP_FUNCTION(tidy_clean_repair);
-static PHP_FUNCTION(tidy_repair_string);
-static PHP_FUNCTION(tidy_repair_file);
-static PHP_FUNCTION(tidy_diagnose);
-static PHP_FUNCTION(tidy_get_output);
-static PHP_FUNCTION(tidy_get_error_buffer);
-static PHP_FUNCTION(tidy_get_release);
-static PHP_FUNCTION(tidy_get_config);
-static PHP_FUNCTION(tidy_get_status);
-static PHP_FUNCTION(tidy_get_html_ver);
-#if HAVE_TIDYOPTGETDOC
-static PHP_FUNCTION(tidy_get_opt_doc);
-#endif
-static PHP_FUNCTION(tidy_is_xhtml);
-static PHP_FUNCTION(tidy_is_xml);
-static PHP_FUNCTION(tidy_error_count);
-static PHP_FUNCTION(tidy_warning_count);
-static PHP_FUNCTION(tidy_access_count);
-static PHP_FUNCTION(tidy_config_count);
-
-static PHP_FUNCTION(tidy_get_root);
-static PHP_FUNCTION(tidy_get_html);
-static PHP_FUNCTION(tidy_get_head);
-static PHP_FUNCTION(tidy_get_body);
-
-static TIDY_DOC_METHOD(__construct);
-static TIDY_DOC_METHOD(parseFile);
-static TIDY_DOC_METHOD(parseString);
-
-static TIDY_NODE_METHOD(hasChildren);
-static TIDY_NODE_METHOD(hasSiblings);
-static TIDY_NODE_METHOD(isComment);
-static TIDY_NODE_METHOD(isHtml);
-static TIDY_NODE_METHOD(isText);
-static TIDY_NODE_METHOD(isJste);
-static TIDY_NODE_METHOD(isAsp);
-static TIDY_NODE_METHOD(isPhp);
-static TIDY_NODE_METHOD(getParent);
-static TIDY_NODE_METHOD(__construct);
-/* }}} */
-
ZEND_DECLARE_MODULE_GLOBALS(tidy)
PHP_INI_BEGIN()
@@ -280,75 +236,6 @@ STD_PHP_INI_ENTRY("tidy.default_config", "", PHP_INI_SYSTEM, OnUpdateString,
STD_PHP_INI_ENTRY("tidy.clean_output", "0", PHP_INI_USER, php_tidy_set_clean_output, clean_output, zend_tidy_globals, tidy_globals)
PHP_INI_END()
-static const zend_function_entry tidy_functions[] = {
- PHP_FE(tidy_getopt, arginfo_tidy_getopt)
- PHP_FE(tidy_parse_string, arginfo_tidy_parse_string)
- PHP_FE(tidy_parse_file, arginfo_tidy_parse_file)
- PHP_FE(tidy_get_output, arginfo_tidy_get_output)
- PHP_FE(tidy_get_error_buffer, arginfo_tidy_get_error_buffer)
- PHP_FE(tidy_clean_repair, arginfo_tidy_clean_repair)
- PHP_FE(tidy_repair_string, arginfo_tidy_repair_string)
- PHP_FE(tidy_repair_file, arginfo_tidy_repair_file)
- PHP_FE(tidy_diagnose, arginfo_tidy_diagnose)
- PHP_FE(tidy_get_release, arginfo_tidy_get_release)
- PHP_FE(tidy_get_config, arginfo_tidy_get_config)
- PHP_FE(tidy_get_status, arginfo_tidy_get_status)
- PHP_FE(tidy_get_html_ver, arginfo_tidy_get_html_ver)
- PHP_FE(tidy_is_xhtml, arginfo_tidy_is_xhtml)
- PHP_FE(tidy_is_xml, arginfo_tidy_is_xml)
- PHP_FE(tidy_error_count, arginfo_tidy_error_count)
- PHP_FE(tidy_warning_count, arginfo_tidy_warning_count)
- PHP_FE(tidy_access_count, arginfo_tidy_access_count)
- PHP_FE(tidy_config_count, arginfo_tidy_config_count)
-#if HAVE_TIDYOPTGETDOC
- PHP_FE(tidy_get_opt_doc, arginfo_tidy_get_opt_doc)
-#endif
- PHP_FE(tidy_get_root, arginfo_tidy_get_root)
- PHP_FE(tidy_get_head, arginfo_tidy_get_head)
- PHP_FE(tidy_get_html, arginfo_tidy_get_html)
- PHP_FE(tidy_get_body, arginfo_tidy_get_body)
- PHP_FE_END
-};
-
-static const zend_function_entry tidy_funcs_doc[] = {
- TIDY_METHOD_MAP(getOpt, tidy_getopt, arginfo_class_tidy_getOpt)
- TIDY_METHOD_MAP(cleanRepair, tidy_clean_repair, arginfo_class_tidy_cleanRepair)
- TIDY_DOC_ME(parseFile, arginfo_class_tidy_parseFile)
- TIDY_DOC_ME(parseString, arginfo_class_tidy_parseString)
- TIDY_METHOD_MAP(repairString, tidy_repair_string, arginfo_class_tidy_repairString)
- TIDY_METHOD_MAP(repairFile, tidy_repair_file, arginfo_class_tidy_repairFile)
- TIDY_METHOD_MAP(diagnose, tidy_diagnose, arginfo_class_tidy_diagnose)
- TIDY_METHOD_MAP(getRelease, tidy_get_release, arginfo_class_tidy_getRelease)
- TIDY_METHOD_MAP(getConfig, tidy_get_config, arginfo_class_tidy_getConfig)
- TIDY_METHOD_MAP(getStatus, tidy_get_status, arginfo_class_tidy_getStatus)
- TIDY_METHOD_MAP(getHtmlVer, tidy_get_html_ver, arginfo_class_tidy_getHtmlVer)
-#if HAVE_TIDYOPTGETDOC
- TIDY_METHOD_MAP(getOptDoc, tidy_get_opt_doc, arginfo_class_tidy_getOptDoc)
-#endif
- TIDY_METHOD_MAP(isXhtml, tidy_is_xhtml, arginfo_class_tidy_isXhtml)
- TIDY_METHOD_MAP(isXml, tidy_is_xml, arginfo_class_tidy_isXml)
- TIDY_METHOD_MAP(root, tidy_get_root, arginfo_class_tidy_root)
- TIDY_METHOD_MAP(head, tidy_get_head, arginfo_class_tidy_head)
- TIDY_METHOD_MAP(html, tidy_get_html, arginfo_class_tidy_html)
- TIDY_METHOD_MAP(body, tidy_get_body, arginfo_class_tidy_body)
- TIDY_DOC_ME(__construct, arginfo_class_tidy___construct)
- PHP_FE_END
-};
-
-static const zend_function_entry tidy_funcs_node[] = {
- TIDY_NODE_ME(hasChildren, arginfo_class_tidyNode_hasChildren)
- TIDY_NODE_ME(hasSiblings, arginfo_class_tidyNode_hasSiblings)
- TIDY_NODE_ME(isComment, arginfo_class_tidyNode_isComment)
- TIDY_NODE_ME(isHtml, arginfo_class_tidyNode_isHtml)
- TIDY_NODE_ME(isText, arginfo_class_tidyNode_isText)
- TIDY_NODE_ME(isJste, arginfo_class_tidyNode_isJste)
- TIDY_NODE_ME(isAsp, arginfo_class_tidyNode_isAsp)
- TIDY_NODE_ME(isPhp, arginfo_class_tidyNode_isPhp)
- TIDY_NODE_ME(getParent, arginfo_class_tidyNode_getParent)
- TIDY_NODE_PRIVATE_ME(__construct, arginfo_class_tidyNode___construct)
- PHP_FE_END
-};
-
static zend_class_entry *tidy_ce_doc, *tidy_ce_node;
static zend_object_handlers tidy_object_handlers_doc;
@@ -357,7 +244,7 @@ static zend_object_handlers tidy_object_handlers_node;
zend_module_entry tidy_module_entry = {
STANDARD_MODULE_HEADER,
"tidy",
- tidy_functions,
+ ext_functions,
PHP_MINIT(tidy),
PHP_MSHUTDOWN(tidy),
PHP_RINIT(tidy),
@@ -1099,7 +986,7 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
/* {{{ proto bool tidy_parse_string(string input [, mixed config_options [, string encoding]])
Parse a document stored in a string */
-static PHP_FUNCTION(tidy_parse_string)
+PHP_FUNCTION(tidy_parse_string)
{
char *enc = NULL;
size_t enc_len = 0;
@@ -1130,7 +1017,7 @@ static PHP_FUNCTION(tidy_parse_string)
/* {{{ proto string tidy_get_error_buffer()
Return warnings and errors which occurred parsing the specified document*/
-static PHP_FUNCTION(tidy_get_error_buffer)
+PHP_FUNCTION(tidy_get_error_buffer)
{
TIDY_FETCH_OBJECT;
@@ -1144,7 +1031,7 @@ static PHP_FUNCTION(tidy_get_error_buffer)
/* {{{ proto string tidy_get_output(tidy tidy)
Return a string representing the parsed tidy markup */
-static PHP_FUNCTION(tidy_get_output)
+PHP_FUNCTION(tidy_get_output)
{
TidyBuffer output;
TIDY_FETCH_OBJECT;
@@ -1159,7 +1046,7 @@ static PHP_FUNCTION(tidy_get_output)
/* {{{ proto bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])
Parse markup in file or URI */
-static PHP_FUNCTION(tidy_parse_file)
+PHP_FUNCTION(tidy_parse_file)
{
char *enc = NULL;
size_t enc_len = 0;
@@ -1200,7 +1087,7 @@ static PHP_FUNCTION(tidy_parse_file)
/* {{{ proto bool tidy_clean_repair(tidy tidy)
Execute configured cleanup and repair operations on parsed markup */
-static PHP_FUNCTION(tidy_clean_repair)
+PHP_FUNCTION(tidy_clean_repair)
{
TIDY_FETCH_OBJECT;
@@ -1215,7 +1102,7 @@ static PHP_FUNCTION(tidy_clean_repair)
/* {{{ proto bool tidy_repair_string(string data [, mixed config_file [, string encoding]])
Repair a string using an optionally provided configuration file */
-static PHP_FUNCTION(tidy_repair_string)
+PHP_FUNCTION(tidy_repair_string)
{
php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, FALSE);
}
@@ -1223,7 +1110,7 @@ static PHP_FUNCTION(tidy_repair_string)
/* {{{ proto bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])
Repair a file using an optionally provided configuration file */
-static PHP_FUNCTION(tidy_repair_file)
+PHP_FUNCTION(tidy_repair_file)
{
php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, TRUE);
}
@@ -1231,7 +1118,7 @@ static PHP_FUNCTION(tidy_repair_file)
/* {{{ proto bool tidy_diagnose()
Run configured diagnostics on parsed and repaired markup. */
-static PHP_FUNCTION(tidy_diagnose)
+PHP_FUNCTION(tidy_diagnose)
{
TIDY_FETCH_OBJECT;
@@ -1246,7 +1133,7 @@ static PHP_FUNCTION(tidy_diagnose)
/* {{{ proto string tidy_get_release()
Get release date (version) for Tidy library */
-static PHP_FUNCTION(tidy_get_release)
+PHP_FUNCTION(tidy_get_release)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
@@ -1264,7 +1151,7 @@ static PHP_FUNCTION(tidy_get_release)
#if HAVE_TIDYOPTGETDOC
/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
Returns the documentation for the given option name */
-static PHP_FUNCTION(tidy_get_opt_doc)
+PHP_FUNCTION(tidy_get_opt_doc)
{
PHPTidyObj *obj;
char *optval, *optname;
@@ -1297,7 +1184,7 @@ static PHP_FUNCTION(tidy_get_opt_doc)
/* {{{ proto array tidy_get_config(tidy tidy)
Get current Tidy configuration */
-static PHP_FUNCTION(tidy_get_config)
+PHP_FUNCTION(tidy_get_config)
{
TidyIterator itOpt;
char *opt_name;
@@ -1336,7 +1223,7 @@ static PHP_FUNCTION(tidy_get_config)
/* {{{ proto int tidy_get_status(tidy tidy)
Get status of specified document. */
-static PHP_FUNCTION(tidy_get_status)
+PHP_FUNCTION(tidy_get_status)
{
TIDY_FETCH_OBJECT;
@@ -1346,7 +1233,7 @@ static PHP_FUNCTION(tidy_get_status)
/* {{{ proto int tidy_get_html_ver(tidy tidy)
Get the Detected HTML version for the specified document. */
-static PHP_FUNCTION(tidy_get_html_ver)
+PHP_FUNCTION(tidy_get_html_ver)
{
TIDY_FETCH_OBJECT;
@@ -1356,7 +1243,7 @@ static PHP_FUNCTION(tidy_get_html_ver)
/* {{{ proto bool tidy_is_xhtml(tidy tidy)
Indicates if the document is a XHTML document. */
-static PHP_FUNCTION(tidy_is_xhtml)
+PHP_FUNCTION(tidy_is_xhtml)
{
TIDY_FETCH_OBJECT;
@@ -1366,7 +1253,7 @@ static PHP_FUNCTION(tidy_is_xhtml)
/* {{{ proto bool tidy_is_xml(tidy tidy)
Indicates if the document is a generic (non HTML/XHTML) XML document. */
-static PHP_FUNCTION(tidy_is_xml)
+PHP_FUNCTION(tidy_is_xml)
{
TIDY_FETCH_OBJECT;
@@ -1376,7 +1263,7 @@ static PHP_FUNCTION(tidy_is_xml)
/* {{{ proto int tidy_error_count(tidy tidy)
Returns the Number of Tidy errors encountered for specified document. */
-static PHP_FUNCTION(tidy_error_count)
+PHP_FUNCTION(tidy_error_count)
{
TIDY_FETCH_OBJECT;
@@ -1386,7 +1273,7 @@ static PHP_FUNCTION(tidy_error_count)
/* {{{ proto int tidy_warning_count(tidy tidy)
Returns the Number of Tidy warnings encountered for specified document. */
-static PHP_FUNCTION(tidy_warning_count)
+PHP_FUNCTION(tidy_warning_count)
{
TIDY_FETCH_OBJECT;
@@ -1396,7 +1283,7 @@ static PHP_FUNCTION(tidy_warning_count)
/* {{{ proto int tidy_access_count(tidy tidy)
Returns the Number of Tidy accessibility warnings encountered for specified document. */
-static PHP_FUNCTION(tidy_access_count)
+PHP_FUNCTION(tidy_access_count)
{
TIDY_FETCH_OBJECT;
@@ -1406,7 +1293,7 @@ static PHP_FUNCTION(tidy_access_count)
/* {{{ proto int tidy_config_count(tidy tidy)
Returns the Number of Tidy configuration errors encountered for specified document. */
-static PHP_FUNCTION(tidy_config_count)
+PHP_FUNCTION(tidy_config_count)
{
TIDY_FETCH_OBJECT;
@@ -1416,7 +1303,7 @@ static PHP_FUNCTION(tidy_config_count)
/* {{{ proto mixed tidy_getopt(string option)
Returns the value of the specified configuration option for the tidy document. */
-static PHP_FUNCTION(tidy_getopt)
+PHP_FUNCTION(tidy_getopt)
{
PHPTidyObj *obj;
char *optname;
@@ -1466,7 +1353,7 @@ static PHP_FUNCTION(tidy_getopt)
}
/* }}} */
-static TIDY_DOC_METHOD(__construct)
+PHP_METHOD(tidy, __construct)
{
char *enc = NULL;
size_t enc_len = 0;
@@ -1503,7 +1390,7 @@ static TIDY_DOC_METHOD(__construct)
}
}
-static TIDY_DOC_METHOD(parseFile)
+PHP_METHOD(tidy, parseFile)
{
char *enc = NULL;
size_t enc_len = 0;
@@ -1542,7 +1429,7 @@ static TIDY_DOC_METHOD(parseFile)
zend_string_release_ex(contents, 0);
}
-static TIDY_DOC_METHOD(parseString)
+PHP_METHOD(tidy, parseString)
{
char *enc = NULL;
size_t enc_len = 0;
@@ -1575,7 +1462,7 @@ static TIDY_DOC_METHOD(parseString)
/* {{{ proto TidyNode tidy_get_root()
Returns a TidyNode Object representing the root of the tidy parse tree */
-static PHP_FUNCTION(tidy_get_root)
+PHP_FUNCTION(tidy_get_root)
{
php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_root_node);
}
@@ -1583,7 +1470,7 @@ static PHP_FUNCTION(tidy_get_root)
/* {{{ proto TidyNode tidy_get_html()
Returns a TidyNode Object starting from the <HTML> tag of the tidy parse tree */
-static PHP_FUNCTION(tidy_get_html)
+PHP_FUNCTION(tidy_get_html)
{
php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_html_node);
}
@@ -1591,7 +1478,7 @@ static PHP_FUNCTION(tidy_get_html)
/* {{{ proto TidyNode tidy_get_head()
Returns a TidyNode Object starting from the <HEAD> tag of the tidy parse tree */
-static PHP_FUNCTION(tidy_get_head)
+PHP_FUNCTION(tidy_get_head)
{
php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_head_node);
}
@@ -1599,7 +1486,7 @@ static PHP_FUNCTION(tidy_get_head)
/* {{{ proto TidyNode tidy_get_body(tidy tidy)
Returns a TidyNode Object starting from the <BODY> tag of the tidy parse tree */
-static PHP_FUNCTION(tidy_get_body)
+PHP_FUNCTION(tidy_get_body)
{
php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_body_node);
}
@@ -1607,7 +1494,7 @@ static PHP_FUNCTION(tidy_get_body)
/* {{{ proto bool tidyNode::hasChildren()
Returns true if this node has children */
-static TIDY_NODE_METHOD(hasChildren)
+PHP_METHOD(tidyNode, hasChildren)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1621,7 +1508,7 @@ static TIDY_NODE_METHOD(hasChildren)
/* {{{ proto bool tidyNode::hasSiblings()
Returns true if this node has siblings */
-static TIDY_NODE_METHOD(hasSiblings)
+PHP_METHOD(tidyNode, hasSiblings)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1635,7 +1522,7 @@ static TIDY_NODE_METHOD(hasSiblings)
/* {{{ proto bool tidyNode::isComment()
Returns true if this node represents a comment */
-static TIDY_NODE_METHOD(isComment)
+PHP_METHOD(tidyNode, isComment)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1649,7 +1536,7 @@ static TIDY_NODE_METHOD(isComment)
/* {{{ proto bool tidyNode::isHtml()
Returns true if this node is part of a HTML document */
-static TIDY_NODE_METHOD(isHtml)
+PHP_METHOD(tidyNode, isHtml)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1663,7 +1550,7 @@ static TIDY_NODE_METHOD(isHtml)
/* {{{ proto bool tidyNode::isText()
Returns true if this node represents text (no markup) */
-static TIDY_NODE_METHOD(isText)
+PHP_METHOD(tidyNode, isText)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1677,7 +1564,7 @@ static TIDY_NODE_METHOD(isText)
/* {{{ proto bool tidyNode::isJste()
Returns true if this node is JSTE */
-static TIDY_NODE_METHOD(isJste)
+PHP_METHOD(tidyNode, isJste)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1691,7 +1578,7 @@ static TIDY_NODE_METHOD(isJste)
/* {{{ proto bool tidyNode::isAsp()
Returns true if this node is ASP */
-static TIDY_NODE_METHOD(isAsp)
+PHP_METHOD(tidyNode, isAsp)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1705,7 +1592,7 @@ static TIDY_NODE_METHOD(isAsp)
/* {{{ proto bool tidyNode::isPhp()
Returns true if this node is PHP */
-static TIDY_NODE_METHOD(isPhp)
+PHP_METHOD(tidyNode, isPhp)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1719,7 +1606,7 @@ static TIDY_NODE_METHOD(isPhp)
/* {{{ proto tidyNode tidyNode::getParent()
Returns the parent node if available or NULL */
-static TIDY_NODE_METHOD(getParent)
+PHP_METHOD(tidyNode, getParent)
{
TidyNode parent_node;
PHPTidyObj *newobj;
@@ -1743,7 +1630,7 @@ static TIDY_NODE_METHOD(getParent)
/* {{{ proto tidyNode::__construct()
__constructor for tidyNode. */
-static TIDY_NODE_METHOD(__construct)
+PHP_METHOD(tidyNode, __construct)
{
zend_throw_error(NULL, "You should not create a tidyNode manually");
}
diff --git a/ext/tidy/tidy.stub.php b/ext/tidy/tidy.stub.php
index 423fecb090..528fe425c9 100644
--- a/ext/tidy/tidy.stub.php
+++ b/ext/tidy/tidy.stub.php
@@ -1,5 +1,7 @@
<?php
+/** @generate-function-entries */
+
/** @param array|string $config_options */
function tidy_parse_string(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN): tidy|false {}
@@ -59,52 +61,120 @@ class tidy
/** @param array|string $config_options */
public function __construct(string $filename = UNKNOWN, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
- /** @return string|int|bool */
+ /**
+ * @return string|int|bool
+ * @alias tidy_getopt
+ */
public function getOpt(string $option) {}
- public function cleanRepair(): bool {}
-
- /** @param array|string $config_options */
- public function parseFile(string $file, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
-
- /** @param array|string $config_options */
- public function parseString(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
-
- /** @param array|string $config_options */
- public function repairString(string $data, $config_options = UNKNOWN, string $encoding = UNKNOWN): bool {}
-
- /** @param array|string $config_options */
- public function repairFile(string $filename, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false): bool {}
-
- public function diagnose(): bool {}
-
- public function getRelease(): string {}
-
- public function getConfig(): array {}
-
- public function getStatus(): int {}
-
- public function getHtmlVer(): int {}
+ /**
+ * @return bool
+ * @alias tidy_clean_repair
+ */
+ public function cleanRepair() {}
+
+ /**
+ * @param array|string $config_options
+ * @return bool
+ */
+ public function parseFile(string $file, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
+
+ /**
+ * @param array|string $config_options
+ * @return bool
+ */
+ public function parseString(string $input, $config_options = UNKNOWN, string $encoding = UNKNOWN) {}
+
+ /**
+ * @param array|string $config_options
+ * @return bool
+ * @alias tidy_repair_string
+ */
+ public function repairString(string $data, $config_options = UNKNOWN, string $encoding = UNKNOWN) {}
+
+ /**
+ * @param array|string $config_options
+ * @return bool
+ * @alias tidy_repair_file
+ */
+ public function repairFile(string $filename, $config_options = UNKNOWN, string $encoding = UNKNOWN, bool $use_include_path = false) {}
+
+ /**
+ * @return bool
+ * @alias tidy_diagnose
+ */
+ public function diagnose() {}
+
+ /**
+ * @return string
+ * @alias tidy_get_release
+ */
+ public function getRelease() {}
+
+ /**
+ * @return array
+ * @alias tidy_get_config
+ */
+ public function getConfig() {}
+
+ /**
+ * @return int
+ * @alias tidy_get_status
+ */
+ public function getStatus() {}
+
+ /**
+ * @return int
+ * @alias tidy_get_html_ver
+ */
+ public function getHtmlVer() {}
#if HAVE_TIDYOPTGETDOC
- /** @return string|false */
+ /**
+ * @return string|false
+ * @alias tidy_get_opt_doc
+ */
public function getOptDoc(string $optname) {}
#endif
- public function isXhtml(): bool {}
-
- public function isXml(): bool {}
-
- public function root(): ?tidyNode {}
-
- public function head(): ?tidyNode {}
-
- public function html(): ?tidyNode {}
-
- public function body(): ?tidyNode {}
+ /**
+ * @return bool
+ * @alias tidy_is_xhtml
+ */
+ public function isXhtml() {}
+
+ /**
+ * @return bool
+ * @alias tidy_is_xml
+ */
+ public function isXml() {}
+
+ /**
+ * @return tidyNode|null
+ * @alias tidy_get_root
+ */
+ public function root() {}
+
+ /**
+ * @return tidyNode|null
+ * @alias tidy_get_head
+ */
+ public function head() {}
+
+ /**
+ * @return tidyNode|null
+ * @alias tidy_get_html
+ */
+ public function html() {}
+
+ /**
+ * @return tidyNode|null
+ * @alias tidy_get_body
+ */
+ public function body() {}
}
-class tidyNode
+final class tidyNode
{
private function __construct() {}
diff --git a/ext/tidy/tidy_arginfo.h b/ext/tidy/tidy_arginfo.h
index afda484431..fca663d5a4 100644
--- a/ext/tidy/tidy_arginfo.h
+++ b/ext/tidy/tidy_arginfo.h
@@ -100,29 +100,29 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_getOpt, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_cleanRepair, 0, 0, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_cleanRepair, 0, 0, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseFile, 0, 1, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_parseFile, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
ZEND_ARG_INFO(0, config_options)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_include_path, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_parseString, 0, 1, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_parseString, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
ZEND_ARG_INFO(0, config_options)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_repairString, 0, 1, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_repairString, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_ARG_INFO(0, config_options)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_repairFile, 0, 1, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_repairFile, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_INFO(0, config_options)
ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
@@ -131,15 +131,13 @@ ZEND_END_ARG_INFO()
#define arginfo_class_tidy_diagnose arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidy_getRelease arginfo_tidy_get_release
+#define arginfo_class_tidy_getRelease arginfo_class_tidy_cleanRepair
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_getConfig, 0, 0, IS_ARRAY, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_class_tidy_getConfig arginfo_class_tidy_cleanRepair
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidy_getStatus, 0, 0, IS_LONG, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_class_tidy_getStatus arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidy_getHtmlVer arginfo_class_tidy_getStatus
+#define arginfo_class_tidy_getHtmlVer arginfo_class_tidy_cleanRepair
#if HAVE_TIDYOPTGETDOC
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_getOptDoc, 0, 0, 1)
@@ -151,32 +149,145 @@ ZEND_END_ARG_INFO()
#define arginfo_class_tidy_isXml arginfo_class_tidy_cleanRepair
-ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_tidy_root, 0, 0, tidyNode, 1)
-ZEND_END_ARG_INFO()
+#define arginfo_class_tidy_root arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidy_head arginfo_class_tidy_root
+#define arginfo_class_tidy_head arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidy_html arginfo_class_tidy_root
+#define arginfo_class_tidy_html arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidy_body arginfo_class_tidy_root
+#define arginfo_class_tidy_body arginfo_class_tidy_cleanRepair
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidyNode___construct, 0, 0, 0)
+#define arginfo_class_tidyNode___construct arginfo_class_tidy_cleanRepair
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_tidyNode_hasChildren, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-#define arginfo_class_tidyNode_hasChildren arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_hasSiblings arginfo_class_tidyNode_hasChildren
+
+#define arginfo_class_tidyNode_isComment arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_hasSiblings arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_isHtml arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_isComment arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_isText arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_isHtml arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_isJste arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_isText arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_isAsp arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_isJste arginfo_class_tidy_cleanRepair
+#define arginfo_class_tidyNode_isPhp arginfo_class_tidyNode_hasChildren
-#define arginfo_class_tidyNode_isAsp arginfo_class_tidy_cleanRepair
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_tidyNode_getParent, 0, 0, tidyNode, 1)
+ZEND_END_ARG_INFO()
-#define arginfo_class_tidyNode_isPhp arginfo_class_tidy_cleanRepair
-#define arginfo_class_tidyNode_getParent arginfo_class_tidy_root
+ZEND_FUNCTION(tidy_parse_string);
+ZEND_FUNCTION(tidy_get_error_buffer);
+ZEND_FUNCTION(tidy_get_output);
+ZEND_FUNCTION(tidy_parse_file);
+ZEND_FUNCTION(tidy_clean_repair);
+ZEND_FUNCTION(tidy_repair_string);
+ZEND_FUNCTION(tidy_repair_file);
+ZEND_FUNCTION(tidy_diagnose);
+ZEND_FUNCTION(tidy_get_release);
+#if HAVE_TIDYOPTGETDOC
+ZEND_FUNCTION(tidy_get_opt_doc);
+#endif
+ZEND_FUNCTION(tidy_get_config);
+ZEND_FUNCTION(tidy_get_status);
+ZEND_FUNCTION(tidy_get_html_ver);
+ZEND_FUNCTION(tidy_is_xhtml);
+ZEND_FUNCTION(tidy_is_xml);
+ZEND_FUNCTION(tidy_error_count);
+ZEND_FUNCTION(tidy_warning_count);
+ZEND_FUNCTION(tidy_access_count);
+ZEND_FUNCTION(tidy_config_count);
+ZEND_FUNCTION(tidy_getopt);
+ZEND_FUNCTION(tidy_get_root);
+ZEND_FUNCTION(tidy_get_html);
+ZEND_FUNCTION(tidy_get_head);
+ZEND_FUNCTION(tidy_get_body);
+ZEND_METHOD(tidy, __construct);
+ZEND_METHOD(tidy, parseFile);
+ZEND_METHOD(tidy, parseString);
+ZEND_METHOD(tidyNode, __construct);
+ZEND_METHOD(tidyNode, hasChildren);
+ZEND_METHOD(tidyNode, hasSiblings);
+ZEND_METHOD(tidyNode, isComment);
+ZEND_METHOD(tidyNode, isHtml);
+ZEND_METHOD(tidyNode, isText);
+ZEND_METHOD(tidyNode, isJste);
+ZEND_METHOD(tidyNode, isAsp);
+ZEND_METHOD(tidyNode, isPhp);
+ZEND_METHOD(tidyNode, getParent);
+
+
+static const zend_function_entry ext_functions[] = {
+ ZEND_FE(tidy_parse_string, arginfo_tidy_parse_string)
+ ZEND_FE(tidy_get_error_buffer, arginfo_tidy_get_error_buffer)
+ ZEND_FE(tidy_get_output, arginfo_tidy_get_output)
+ ZEND_FE(tidy_parse_file, arginfo_tidy_parse_file)
+ ZEND_FE(tidy_clean_repair, arginfo_tidy_clean_repair)
+ ZEND_FE(tidy_repair_string, arginfo_tidy_repair_string)
+ ZEND_FE(tidy_repair_file, arginfo_tidy_repair_file)
+ ZEND_FE(tidy_diagnose, arginfo_tidy_diagnose)
+ ZEND_FE(tidy_get_release, arginfo_tidy_get_release)
+#if HAVE_TIDYOPTGETDOC
+ ZEND_FE(tidy_get_opt_doc, arginfo_tidy_get_opt_doc)
+#endif
+ ZEND_FE(tidy_get_config, arginfo_tidy_get_config)
+ ZEND_FE(tidy_get_status, arginfo_tidy_get_status)
+ ZEND_FE(tidy_get_html_ver, arginfo_tidy_get_html_ver)
+ ZEND_FE(tidy_is_xhtml, arginfo_tidy_is_xhtml)
+ ZEND_FE(tidy_is_xml, arginfo_tidy_is_xml)
+ ZEND_FE(tidy_error_count, arginfo_tidy_error_count)
+ ZEND_FE(tidy_warning_count, arginfo_tidy_warning_count)
+ ZEND_FE(tidy_access_count, arginfo_tidy_access_count)
+ ZEND_FE(tidy_config_count, arginfo_tidy_config_count)
+ ZEND_FE(tidy_getopt, arginfo_tidy_getopt)
+ ZEND_FE(tidy_get_root, arginfo_tidy_get_root)
+ ZEND_FE(tidy_get_html, arginfo_tidy_get_html)
+ ZEND_FE(tidy_get_head, arginfo_tidy_get_head)
+ ZEND_FE(tidy_get_body, arginfo_tidy_get_body)
+ ZEND_FE_END
+};
+
+
+static const zend_function_entry class_tidy_methods[] = {
+ ZEND_ME(tidy, __construct, arginfo_class_tidy___construct, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(getOpt, tidy_getopt, arginfo_class_tidy_getOpt, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(cleanRepair, tidy_clean_repair, arginfo_class_tidy_cleanRepair, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidy, parseFile, arginfo_class_tidy_parseFile, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidy, parseString, arginfo_class_tidy_parseString, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(repairString, tidy_repair_string, arginfo_class_tidy_repairString, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(repairFile, tidy_repair_file, arginfo_class_tidy_repairFile, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(diagnose, tidy_diagnose, arginfo_class_tidy_diagnose, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(getRelease, tidy_get_release, arginfo_class_tidy_getRelease, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(getConfig, tidy_get_config, arginfo_class_tidy_getConfig, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(getStatus, tidy_get_status, arginfo_class_tidy_getStatus, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(getHtmlVer, tidy_get_html_ver, arginfo_class_tidy_getHtmlVer, ZEND_ACC_PUBLIC)
+#if HAVE_TIDYOPTGETDOC
+ ZEND_ME_MAPPING(getOptDoc, tidy_get_opt_doc, arginfo_class_tidy_getOptDoc, ZEND_ACC_PUBLIC)
+#endif
+ ZEND_ME_MAPPING(isXhtml, tidy_is_xhtml, arginfo_class_tidy_isXhtml, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(isXml, tidy_is_xml, arginfo_class_tidy_isXml, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(root, tidy_get_root, arginfo_class_tidy_root, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(head, tidy_get_head, arginfo_class_tidy_head, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(html, tidy_get_html, arginfo_class_tidy_html, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(body, tidy_get_body, arginfo_class_tidy_body, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
+
+
+static const zend_function_entry class_tidyNode_methods[] = {
+ ZEND_ME(tidyNode, __construct, arginfo_class_tidyNode___construct, ZEND_ACC_PRIVATE)
+ ZEND_ME(tidyNode, hasChildren, arginfo_class_tidyNode_hasChildren, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, hasSiblings, arginfo_class_tidyNode_hasSiblings, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isComment, arginfo_class_tidyNode_isComment, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isHtml, arginfo_class_tidyNode_isHtml, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isText, arginfo_class_tidyNode_isText, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isJste, arginfo_class_tidyNode_isJste, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isAsp, arginfo_class_tidyNode_isAsp, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, isPhp, arginfo_class_tidyNode_isPhp, ZEND_ACC_PUBLIC)
+ ZEND_ME(tidyNode, getParent, arginfo_class_tidyNode_getParent, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 364d70bf08..f07a839bb6 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -44,23 +44,12 @@ void tokenizer_token_get_all_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("TOKEN_PARSE", TOKEN_PARSE, CONST_CS|CONST_PERSISTENT);
}
-/* {{{ tokenizer_functions[]
- *
- * Every user visible function must have an entry in tokenizer_functions[].
- */
-static const zend_function_entry tokenizer_functions[] = {
- PHP_FE(token_get_all, arginfo_token_get_all)
- PHP_FE(token_name, arginfo_token_name)
- PHP_FE_END
-};
-/* }}} */
-
/* {{{ tokenizer_module_entry
*/
zend_module_entry tokenizer_module_entry = {
STANDARD_MODULE_HEADER,
"tokenizer",
- tokenizer_functions,
+ ext_functions,
PHP_MINIT(tokenizer),
NULL,
NULL,
@@ -260,16 +249,6 @@ PHP_METHOD(PhpToken, __toString)
RETURN_STR_COPY(text);
}
-static const zend_function_entry php_token_methods[] = {
- PHP_ME(PhpToken, getAll, arginfo_class_PhpToken_getAll, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- PHP_ME(PhpToken, __construct, arginfo_class_PhpToken___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- PHP_ME(PhpToken, is, arginfo_class_PhpToken_is, ZEND_ACC_PUBLIC)
- PHP_ME(PhpToken, isIgnorable, arginfo_class_PhpToken_isIgnorable, ZEND_ACC_PUBLIC)
- PHP_ME(PhpToken, getTokenName, arginfo_class_PhpToken_getTokenName, ZEND_ACC_PUBLIC)
- PHP_ME(PhpToken, __toString, arginfo_class_PhpToken___toString, ZEND_ACC_PUBLIC)
- PHP_FE_END
-};
-
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(tokenizer)
@@ -282,7 +261,7 @@ PHP_MINIT_FUNCTION(tokenizer)
tokenizer_register_constants(INIT_FUNC_ARGS_PASSTHRU);
tokenizer_token_get_all_register_constants(INIT_FUNC_ARGS_PASSTHRU);
- INIT_CLASS_ENTRY(ce, "PhpToken", php_token_methods);
+ INIT_CLASS_ENTRY(ce, "PhpToken", class_PhpToken_methods);
php_token_ce = zend_register_internal_class(&ce);
zend_class_implements(php_token_ce, 1, zend_ce_stringable);
diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php
index 801c1c8504..19fd3411cd 100644
--- a/ext/tokenizer/tokenizer.stub.php
+++ b/ext/tokenizer/tokenizer.stub.php
@@ -1,21 +1,24 @@
<?php
+/** @generate-function-entries */
+
function token_get_all(string $source, int $flags = 0): array {}
function token_name(int $token): string {}
-class PhpToken implements Stringable {
+class PhpToken implements Stringable
+{
/** @return static[] */
- public static function getAll(string $code, int $flags = 0): array;
+ public static function getAll(string $code, int $flags = 0): array {}
- public final function __construct(int $id, string $text, int $line = -1, int $pos = -1);
+ public final function __construct(int $id, string $text, int $line = -1, int $pos = -1) {}
/** @param int|string|array $kind */
- public function is($kind): bool;
+ public function is($kind): bool {}
- public function isIgnorable(): bool;
+ public function isIgnorable(): bool {}
- public function getTokenName(): ?string;
+ public function getTokenName(): ?string {}
- public function __toString(): string;
+ public function __toString(): string {}
}
diff --git a/ext/tokenizer/tokenizer_arginfo.h b/ext/tokenizer/tokenizer_arginfo.h
index 29245a5091..76f17a76ce 100644
--- a/ext/tokenizer/tokenizer_arginfo.h
+++ b/ext/tokenizer/tokenizer_arginfo.h
@@ -33,3 +33,31 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken___toString, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(token_get_all);
+ZEND_FUNCTION(token_name);
+ZEND_METHOD(PhpToken, getAll);
+ZEND_METHOD(PhpToken, __construct);
+ZEND_METHOD(PhpToken, is);
+ZEND_METHOD(PhpToken, isIgnorable);
+ZEND_METHOD(PhpToken, getTokenName);
+ZEND_METHOD(PhpToken, __toString);
+
+
+static const zend_function_entry ext_functions[] = {
+ ZEND_FE(token_get_all, arginfo_token_get_all)
+ ZEND_FE(token_name, arginfo_token_name)
+ ZEND_FE_END
+};
+
+
+static const zend_function_entry class_PhpToken_methods[] = {
+ ZEND_ME(PhpToken, getAll, arginfo_class_PhpToken_getAll, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_ME(PhpToken, __construct, arginfo_class_PhpToken___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(PhpToken, is, arginfo_class_PhpToken_is, ZEND_ACC_PUBLIC)
+ ZEND_ME(PhpToken, isIgnorable, arginfo_class_PhpToken_isIgnorable, ZEND_ACC_PUBLIC)
+ ZEND_ME(PhpToken, getTokenName, arginfo_class_PhpToken_getTokenName, ZEND_ACC_PUBLIC)
+ ZEND_ME(PhpToken, __toString, arginfo_class_PhpToken___toString, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index 1428423a4e..4477523edf 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -251,14 +251,10 @@ static void php_xml_free_wrapper(void *ptr)
}
}
-static const zend_function_entry xml_parser_methods[] = {
- PHP_FE_END
-};
-
PHP_MINIT_FUNCTION(xml)
{
zend_class_entry ce;
- INIT_CLASS_ENTRY(ce, "XmlParser", xml_parser_methods);
+ INIT_CLASS_ENTRY(ce, "XmlParser", class_XMLParser_methods);
xml_parser_ce = zend_register_internal_class(&ce);
xml_parser_ce->create_object = xml_parser_create_object;
xml_parser_ce->ce_flags |= ZEND_ACC_FINAL;
diff --git a/ext/xml/xml.stub.php b/ext/xml/xml.stub.php
index 1c43441b4d..9693eeba81 100644
--- a/ext/xml/xml.stub.php
+++ b/ext/xml/xml.stub.php
@@ -57,3 +57,7 @@ function xml_parser_free(XmlParser $parser): bool {}
function xml_parser_set_option(XmlParser $parser, int $option, $value): bool {}
function xml_parser_get_option(XmlParser $parser, int $option): string|int|false {}
+
+final class XMLParser
+{
+}
diff --git a/ext/xml/xml_arginfo.h b/ext/xml/xml_arginfo.h
index ecd295b55f..1e448ac816 100644
--- a/ext/xml/xml_arginfo.h
+++ b/ext/xml/xml_arginfo.h
@@ -131,3 +131,8 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(xml_parser_get_option, arginfo_xml_parser_get_option)
ZEND_FE_END
};
+
+
+static const zend_function_entry class_XMLParser_methods[] = {
+ ZEND_FE_END
+};
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index 8ba87763c1..acb39a7fc9 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -23,13 +23,13 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_xmlreader.h"
+#include "php_xmlreader_arginfo.h"
#ifdef HAVE_DOM
#include "ext/dom/xml_common.h"
#include "ext/dom/dom_ce.h"
#endif
#include <libxml/xmlreader.h>
#include <libxml/uri.h>
-#include "xmlreader_arginfo.h"
zend_class_entry *xmlreader_class_entry;
@@ -523,7 +523,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t
/* {{{ proto bool XMLReader::close()
Closes xmlreader - current frees resources until xmlTextReaderClose is fixed in libxml */
-PHP_METHOD(xmlreader, close)
+PHP_METHOD(XMLReader, close)
{
zval *id;
xmlreader_object *intern;
@@ -545,7 +545,7 @@ PHP_METHOD(xmlreader, close)
/* {{{ proto string XMLReader::getAttribute(string name)
Get value of an attribute from current element */
-PHP_METHOD(xmlreader, getAttribute)
+PHP_METHOD(XMLReader, getAttribute)
{
php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderGetAttribute);
}
@@ -553,7 +553,7 @@ PHP_METHOD(xmlreader, getAttribute)
/* {{{ proto string XMLReader::getAttributeNo(int index)
Get value of an attribute at index from current element */
-PHP_METHOD(xmlreader, getAttributeNo)
+PHP_METHOD(XMLReader, getAttributeNo)
{
zval *id;
zend_long attr_pos;
@@ -579,7 +579,7 @@ PHP_METHOD(xmlreader, getAttributeNo)
/* {{{ proto string XMLReader::getAttributeNs(string name, string namespaceURI)
Get value of a attribute via name and namespace from current element */
-PHP_METHOD(xmlreader, getAttributeNs)
+PHP_METHOD(XMLReader, getAttributeNs)
{
zval *id;
size_t name_len = 0, ns_uri_len = 0;
@@ -610,7 +610,7 @@ PHP_METHOD(xmlreader, getAttributeNs)
/* {{{ proto bool XMLReader::getParserProperty(int property)
Indicates whether given property (one of the parser option constants) is set or not on parser */
-PHP_METHOD(xmlreader, getParserProperty)
+PHP_METHOD(XMLReader, getParserProperty)
{
zval *id;
zend_long property;
@@ -640,7 +640,7 @@ PHP_METHOD(xmlreader, getParserProperty)
Returns boolean indicating if parsed document is valid or not.
Must set XMLREADER_LOADDTD or XMLREADER_VALIDATE parser option prior to the first call to read
or this method will always return FALSE */
-PHP_METHOD(xmlreader, isValid)
+PHP_METHOD(XMLReader, isValid)
{
php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderIsValid);
}
@@ -648,7 +648,7 @@ PHP_METHOD(xmlreader, isValid)
/* {{{ proto string XMLReader::lookupNamespace(string prefix)
Return namespaceURI for associated prefix on current node */
-PHP_METHOD(xmlreader, lookupNamespace)
+PHP_METHOD(XMLReader, lookupNamespace)
{
php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderLookupNamespace);
}
@@ -656,7 +656,7 @@ PHP_METHOD(xmlreader, lookupNamespace)
/* {{{ proto bool XMLReader::moveToAttribute(string name)
Positions reader at specified attribute - Returns TRUE on success and FALSE on failure */
-PHP_METHOD(xmlreader, moveToAttribute)
+PHP_METHOD(XMLReader, moveToAttribute)
{
zval *id;
size_t name_len = 0;
@@ -690,7 +690,7 @@ PHP_METHOD(xmlreader, moveToAttribute)
/* {{{ proto bool XMLReader::moveToAttributeNo(int index)
Positions reader at attribute at specified index.
Returns TRUE on success and FALSE on failure */
-PHP_METHOD(xmlreader, moveToAttributeNo)
+PHP_METHOD(XMLReader, moveToAttributeNo)
{
zval *id;
zend_long attr_pos;
@@ -718,7 +718,7 @@ PHP_METHOD(xmlreader, moveToAttributeNo)
/* {{{ proto bool XMLReader::moveToAttributeNs(string name, string namespaceURI)
Positions reader at attribute spcified by name and namespaceURI.
Returns TRUE on success and FALSE on failure */
-PHP_METHOD(xmlreader, moveToAttributeNs)
+PHP_METHOD(XMLReader, moveToAttributeNs)
{
zval *id;
size_t name_len=0, ns_uri_len=0;
@@ -751,7 +751,7 @@ PHP_METHOD(xmlreader, moveToAttributeNs)
/* {{{ proto bool XMLReader::moveToElement()
Moves the position of the current instance to the node that contains the current Attribute node. */
-PHP_METHOD(xmlreader, moveToElement)
+PHP_METHOD(XMLReader, moveToElement)
{
php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToElement);
}
@@ -759,7 +759,7 @@ PHP_METHOD(xmlreader, moveToElement)
/* {{{ proto bool XMLReader::moveToFirstAttribute()
Moves the position of the current instance to the first attribute associated with the current node. */
-PHP_METHOD(xmlreader, moveToFirstAttribute)
+PHP_METHOD(XMLReader, moveToFirstAttribute)
{
php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToFirstAttribute);
}
@@ -767,7 +767,7 @@ PHP_METHOD(xmlreader, moveToFirstAttribute)
/* {{{ proto bool XMLReader::moveToNextAttribute()
Moves the position of the current instance to the next attribute associated with the current node. */
-PHP_METHOD(xmlreader, moveToNextAttribute)
+PHP_METHOD(XMLReader, moveToNextAttribute)
{
php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderMoveToNextAttribute);
}
@@ -775,7 +775,7 @@ PHP_METHOD(xmlreader, moveToNextAttribute)
/* {{{ proto bool XMLReader::read()
Moves the position of the current instance to the next node in the stream. */
-PHP_METHOD(xmlreader, read)
+PHP_METHOD(XMLReader, read)
{
zval *id;
int retval;
@@ -803,7 +803,7 @@ PHP_METHOD(xmlreader, read)
/* {{{ proto bool XMLReader::next([string localname])
Moves the position of the current instance to the next node in the stream. */
-PHP_METHOD(xmlreader, next)
+PHP_METHOD(XMLReader, next)
{
zval *id;
int retval;
@@ -839,7 +839,7 @@ PHP_METHOD(xmlreader, next)
/* {{{ proto bool XMLReader::open(string URI [, string encoding [, int options]])
Sets the URI that the XMLReader will parse. */
-PHP_METHOD(xmlreader, open)
+PHP_METHOD(XMLReader, open)
{
zval *id;
size_t source_len = 0, encoding_len = 0;
@@ -895,7 +895,7 @@ PHP_METHOD(xmlreader, open)
/* }}} */
/* Not Yet Implemented in libxml - functions exist just not coded
-PHP_METHOD(xmlreader, resetState)
+PHP_METHOD(XMLReader, resetState)
{
}
@@ -903,7 +903,7 @@ PHP_METHOD(xmlreader, resetState)
/* {{{ proto string XMLReader::readInnerXml()
Reads the contents of the current node, including child nodes and markup. */
-PHP_METHOD(xmlreader, readInnerXml)
+PHP_METHOD(XMLReader, readInnerXml)
{
php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadInnerXml);
}
@@ -911,7 +911,7 @@ PHP_METHOD(xmlreader, readInnerXml)
/* {{{ proto bool XMLReader::readOuterXml()
Reads the contents of the current node, including child nodes and markup. */
-PHP_METHOD(xmlreader, readOuterXml)
+PHP_METHOD(XMLReader, readOuterXml)
{
php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadOuterXml);
}
@@ -919,7 +919,7 @@ PHP_METHOD(xmlreader, readOuterXml)
/* {{{ proto bool XMLReader::readString()
Reads the contents of an element or a text node as a string. */
-PHP_METHOD(xmlreader, readString)
+PHP_METHOD(XMLReader, readString)
{
php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextReaderReadString);
}
@@ -927,7 +927,7 @@ PHP_METHOD(xmlreader, readString)
/* {{{ proto bool XMLReader::setSchema(string filename)
Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). */
-PHP_METHOD(xmlreader, setSchema)
+PHP_METHOD(XMLReader, setSchema)
{
#ifdef LIBXML_SCHEMAS_ENABLED
zval *id;
@@ -970,7 +970,7 @@ PHP_METHOD(xmlreader, setSchema)
/* {{{ proto bool XMLReader::setParserProperty(int property, bool value)
Sets parser property (one of the parser option constants).
Properties must be set after open() or XML() and before the first read() is called */
-PHP_METHOD(xmlreader, setParserProperty)
+PHP_METHOD(XMLReader, setParserProperty)
{
zval *id;
zend_long property;
@@ -999,7 +999,7 @@ PHP_METHOD(xmlreader, setParserProperty)
/* {{{ proto bool XMLReader::setRelaxNGSchema(string filename)
Sets the string that the XMLReader will parse. */
-PHP_METHOD(xmlreader, setRelaxNGSchema)
+PHP_METHOD(XMLReader, setRelaxNGSchema)
{
php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAM_PASSTHRU, XMLREADER_LOAD_FILE);
}
@@ -1007,7 +1007,7 @@ PHP_METHOD(xmlreader, setRelaxNGSchema)
/* {{{ proto bool XMLReader::setRelaxNGSchemaSource(string source)
Sets the string that the XMLReader will parse. */
-PHP_METHOD(xmlreader, setRelaxNGSchemaSource)
+PHP_METHOD(XMLReader, setRelaxNGSchemaSource)
{
php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAM_PASSTHRU, XMLREADER_LOAD_STRING);
}
@@ -1021,7 +1021,7 @@ XMLPUBFUN int XMLCALL
/* {{{ proto bool XMLReader::XML(string source [, string encoding [, int options]])
Sets the string that the XMLReader will parse. */
-PHP_METHOD(xmlreader, XML)
+PHP_METHOD(XMLReader, XML)
{
zval *id;
size_t source_len = 0, encoding_len = 0;
@@ -1105,7 +1105,7 @@ PHP_METHOD(xmlreader, XML)
/* {{{ proto bool XMLReader::expand()
Moves the position of the current instance to the next node in the stream. */
-PHP_METHOD(xmlreader, expand)
+PHP_METHOD(XMLReader, expand)
{
#ifdef HAVE_DOM
zval *id, *basenode = NULL;
@@ -1153,38 +1153,6 @@ PHP_METHOD(xmlreader, expand)
}
/* }}} */
-static const zend_function_entry xmlreader_functions[] /* {{{ */ = {
- PHP_ME(xmlreader, close, arginfo_class_XMLReader_close, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, getAttribute, arginfo_class_XMLReader_getAttribute, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, getAttributeNo, arginfo_class_XMLReader_getAttributeNo, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, getAttributeNs, arginfo_class_XMLReader_getAttributeNs, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, getParserProperty, arginfo_class_XMLReader_getParserProperty, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, isValid, arginfo_class_XMLReader_isValid, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, lookupNamespace, arginfo_class_XMLReader_lookupNamespace, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToAttributeNo, arginfo_class_XMLReader_moveToAttributeNo, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToAttribute, arginfo_class_XMLReader_moveToAttribute, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToAttributeNs, arginfo_class_XMLReader_moveToAttributeNs, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToElement, arginfo_class_XMLReader_moveToElement, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToFirstAttribute, arginfo_class_XMLReader_moveToFirstAttribute, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, moveToNextAttribute, arginfo_class_XMLReader_moveToNextAttribute, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, open, arginfo_class_XMLReader_open, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- PHP_ME(xmlreader, read, arginfo_class_XMLReader_read, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, next, arginfo_class_XMLReader_next, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, readInnerXml, arginfo_class_XMLReader_readInnerXml, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, readOuterXml, arginfo_class_XMLReader_readOuterXml, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, readString, arginfo_class_XMLReader_readString, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, setSchema, arginfo_class_XMLReader_setSchema, ZEND_ACC_PUBLIC)
-/* Not Yet Implemented though defined in libxml as of 2.6.9dev
- PHP_ME(xmlreader, resetState, NULL, ZEND_ACC_PUBLIC)
-*/
- PHP_ME(xmlreader, setParserProperty, arginfo_class_XMLReader_setParserProperty, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, setRelaxNGSchema, arginfo_class_XMLReader_setRelaxNGSchema, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, setRelaxNGSchemaSource, arginfo_class_XMLReader_setRelaxNGSchemaSource, ZEND_ACC_PUBLIC)
- PHP_ME(xmlreader, XML, arginfo_class_XMLReader_XML, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- PHP_ME(xmlreader, expand, arginfo_class_XMLReader_expand, ZEND_ACC_PUBLIC)
- PHP_FE_END
-}; /* }}} */
-
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(xmlreader)
@@ -1202,7 +1170,7 @@ PHP_MINIT_FUNCTION(xmlreader)
xmlreader_object_handlers.get_method = xmlreader_get_method;
xmlreader_object_handlers.clone_obj = NULL;
- INIT_CLASS_ENTRY(ce, "XMLReader", xmlreader_functions);
+ INIT_CLASS_ENTRY(ce, "XMLReader", class_XMLReader_methods);
ce.create_object = xmlreader_objects_new;
xmlreader_class_entry = zend_register_internal_class(&ce);
diff --git a/ext/xmlreader/xmlreader.stub.php b/ext/xmlreader/php_xmlreader.stub.php
index 5cc08651fa..cbf7bb1bee 100644
--- a/ext/xmlreader/xmlreader.stub.php
+++ b/ext/xmlreader/php_xmlreader.stub.php
@@ -1,5 +1,7 @@
<?php
+/** @generate-function-entries */
+
class XMLReader
{
/** @return bool */
@@ -48,7 +50,7 @@ class XMLReader
public function next(string $localname = UNKNOWN) {}
/** @return bool|XMLReader */
- public function open(string $URI, ?string $encoding = null, int $options = 0) {}
+ public static function open(string $URI, ?string $encoding = null, int $options = 0) {}
/** @return string */
public function readInnerXml() {}
@@ -72,7 +74,7 @@ class XMLReader
public function setRelaxNGSchemaSource(?string $source) {}
/** @return bool|XMLReader */
- public function XML(string $source, ?string $encoding = null, int $options = 0) {}
+ public static function XML(string $source, ?string $encoding = null, int $options = 0) {}
/** @return DOMNode|bool */
public function expand(?DOMNode $basenode = null) {}
diff --git a/ext/xmlreader/php_xmlreader_arginfo.h b/ext/xmlreader/php_xmlreader_arginfo.h
new file mode 100644
index 0000000000..0b9d28c944
--- /dev/null
+++ b/ext/xmlreader/php_xmlreader_arginfo.h
@@ -0,0 +1,139 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_close, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttribute, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNo, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_XMLReader_isValid arginfo_class_XMLReader_close
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_lookupNamespace, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_XMLReader_moveToAttribute arginfo_class_XMLReader_getAttribute
+
+#define arginfo_class_XMLReader_moveToAttributeNo arginfo_class_XMLReader_getAttributeNo
+
+#define arginfo_class_XMLReader_moveToAttributeNs arginfo_class_XMLReader_getAttributeNs
+
+#define arginfo_class_XMLReader_moveToElement arginfo_class_XMLReader_close
+
+#define arginfo_class_XMLReader_moveToFirstAttribute arginfo_class_XMLReader_close
+
+#define arginfo_class_XMLReader_moveToNextAttribute arginfo_class_XMLReader_close
+
+#define arginfo_class_XMLReader_read arginfo_class_XMLReader_close
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_next, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, localname, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_open, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, URI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_XMLReader_readInnerXml arginfo_class_XMLReader_close
+
+#define arginfo_class_XMLReader_readOuterXml arginfo_class_XMLReader_close
+
+#define arginfo_class_XMLReader_readString arginfo_class_XMLReader_close
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setSchema, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setParserProperty, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, value, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_XMLReader_setRelaxNGSchema arginfo_class_XMLReader_setSchema
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setRelaxNGSchemaSource, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_XML, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_expand, 0, 0, 0)
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, basenode, DOMNode, 1, "null")
+ZEND_END_ARG_INFO()
+
+
+ZEND_METHOD(XMLReader, close);
+ZEND_METHOD(XMLReader, getAttribute);
+ZEND_METHOD(XMLReader, getAttributeNo);
+ZEND_METHOD(XMLReader, getAttributeNs);
+ZEND_METHOD(XMLReader, getParserProperty);
+ZEND_METHOD(XMLReader, isValid);
+ZEND_METHOD(XMLReader, lookupNamespace);
+ZEND_METHOD(XMLReader, moveToAttribute);
+ZEND_METHOD(XMLReader, moveToAttributeNo);
+ZEND_METHOD(XMLReader, moveToAttributeNs);
+ZEND_METHOD(XMLReader, moveToElement);
+ZEND_METHOD(XMLReader, moveToFirstAttribute);
+ZEND_METHOD(XMLReader, moveToNextAttribute);
+ZEND_METHOD(XMLReader, read);
+ZEND_METHOD(XMLReader, next);
+ZEND_METHOD(XMLReader, open);
+ZEND_METHOD(XMLReader, readInnerXml);
+ZEND_METHOD(XMLReader, readOuterXml);
+ZEND_METHOD(XMLReader, readString);
+ZEND_METHOD(XMLReader, setSchema);
+ZEND_METHOD(XMLReader, setParserProperty);
+ZEND_METHOD(XMLReader, setRelaxNGSchema);
+ZEND_METHOD(XMLReader, setRelaxNGSchemaSource);
+ZEND_METHOD(XMLReader, XML);
+ZEND_METHOD(XMLReader, expand);
+
+
+static const zend_function_entry class_XMLReader_methods[] = {
+ ZEND_ME(XMLReader, close, arginfo_class_XMLReader_close, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, getAttribute, arginfo_class_XMLReader_getAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, getAttributeNo, arginfo_class_XMLReader_getAttributeNo, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, getAttributeNs, arginfo_class_XMLReader_getAttributeNs, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, getParserProperty, arginfo_class_XMLReader_getParserProperty, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, isValid, arginfo_class_XMLReader_isValid, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, lookupNamespace, arginfo_class_XMLReader_lookupNamespace, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToAttribute, arginfo_class_XMLReader_moveToAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToAttributeNo, arginfo_class_XMLReader_moveToAttributeNo, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToAttributeNs, arginfo_class_XMLReader_moveToAttributeNs, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToElement, arginfo_class_XMLReader_moveToElement, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToFirstAttribute, arginfo_class_XMLReader_moveToFirstAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, moveToNextAttribute, arginfo_class_XMLReader_moveToNextAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, read, arginfo_class_XMLReader_read, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, next, arginfo_class_XMLReader_next, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, open, arginfo_class_XMLReader_open, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_ME(XMLReader, readInnerXml, arginfo_class_XMLReader_readInnerXml, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, readOuterXml, arginfo_class_XMLReader_readOuterXml, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, readString, arginfo_class_XMLReader_readString, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, setSchema, arginfo_class_XMLReader_setSchema, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, setParserProperty, arginfo_class_XMLReader_setParserProperty, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, setRelaxNGSchema, arginfo_class_XMLReader_setRelaxNGSchema, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, setRelaxNGSchemaSource, arginfo_class_XMLReader_setRelaxNGSchemaSource, ZEND_ACC_PUBLIC)
+ ZEND_ME(XMLReader, XML, arginfo_class_XMLReader_XML, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_ME(XMLReader, expand, arginfo_class_XMLReader_expand, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};
diff --git a/ext/xmlreader/xmlreader_arginfo.h b/ext/xmlreader/xmlreader_arginfo.h
deleted file mode 100644
index 39d84763f2..0000000000
--- a/ext/xmlreader/xmlreader_arginfo.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* This is a generated file, edit the .stub.php file instead. */
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_close, 0, 0, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttribute, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNo, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 0, 2)
- ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
-ZEND_END_ARG_INFO()
-
-#define arginfo_class_XMLReader_isValid arginfo_class_XMLReader_close
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_lookupNamespace, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)
-ZEND_END_ARG_INFO()
-
-#define arginfo_class_XMLReader_moveToAttribute arginfo_class_XMLReader_getAttribute
-
-#define arginfo_class_XMLReader_moveToAttributeNo arginfo_class_XMLReader_getAttributeNo
-
-#define arginfo_class_XMLReader_moveToAttributeNs arginfo_class_XMLReader_getAttributeNs
-
-#define arginfo_class_XMLReader_moveToElement arginfo_class_XMLReader_close
-
-#define arginfo_class_XMLReader_moveToFirstAttribute arginfo_class_XMLReader_close
-
-#define arginfo_class_XMLReader_moveToNextAttribute arginfo_class_XMLReader_close
-
-#define arginfo_class_XMLReader_read arginfo_class_XMLReader_close
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_next, 0, 0, 0)
- ZEND_ARG_TYPE_INFO(0, localname, IS_STRING, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_open, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, URI, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
-ZEND_END_ARG_INFO()
-
-#define arginfo_class_XMLReader_readInnerXml arginfo_class_XMLReader_close
-
-#define arginfo_class_XMLReader_readOuterXml arginfo_class_XMLReader_close
-
-#define arginfo_class_XMLReader_readString arginfo_class_XMLReader_close
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setSchema, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setParserProperty, 0, 0, 2)
- ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO(0, value, _IS_BOOL, 0)
-ZEND_END_ARG_INFO()
-
-#define arginfo_class_XMLReader_setRelaxNGSchema arginfo_class_XMLReader_setSchema
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setRelaxNGSchemaSource, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 1)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_XML, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_expand, 0, 0, 0)
- ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, basenode, DOMNode, 1, "null")
-ZEND_END_ARG_INFO()
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index a2e3acacaf..a817530714 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -24,51 +24,8 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_xmlwriter.h"
+#include "php_xmlwriter_arginfo.h"
#include "ext/standard/php_string.h"
-#include "xmlwriter_arginfo.h"
-
-static PHP_FUNCTION(xmlwriter_set_indent);
-static PHP_FUNCTION(xmlwriter_set_indent_string);
-static PHP_FUNCTION(xmlwriter_start_attribute);
-static PHP_FUNCTION(xmlwriter_end_attribute);
-static PHP_FUNCTION(xmlwriter_write_attribute);
-static PHP_FUNCTION(xmlwriter_start_attribute_ns);
-static PHP_FUNCTION(xmlwriter_write_attribute_ns);
-static PHP_FUNCTION(xmlwriter_start_element);
-static PHP_FUNCTION(xmlwriter_end_element);
-static PHP_FUNCTION(xmlwriter_full_end_element);
-static PHP_FUNCTION(xmlwriter_start_element_ns);
-static PHP_FUNCTION(xmlwriter_write_element);
-static PHP_FUNCTION(xmlwriter_write_element_ns);
-static PHP_FUNCTION(xmlwriter_start_pi);
-static PHP_FUNCTION(xmlwriter_end_pi);
-static PHP_FUNCTION(xmlwriter_write_pi);
-static PHP_FUNCTION(xmlwriter_start_cdata);
-static PHP_FUNCTION(xmlwriter_end_cdata);
-static PHP_FUNCTION(xmlwriter_write_cdata);
-static PHP_FUNCTION(xmlwriter_text);
-static PHP_FUNCTION(xmlwriter_write_raw);
-static PHP_FUNCTION(xmlwriter_start_document);
-static PHP_FUNCTION(xmlwriter_end_document);
-static PHP_FUNCTION(xmlwriter_start_comment);
-static PHP_FUNCTION(xmlwriter_end_comment);
-static PHP_FUNCTION(xmlwriter_write_comment);
-static PHP_FUNCTION(xmlwriter_start_dtd);
-static PHP_FUNCTION(xmlwriter_end_dtd);
-static PHP_FUNCTION(xmlwriter_write_dtd);
-static PHP_FUNCTION(xmlwriter_start_dtd_element);
-static PHP_FUNCTION(xmlwriter_end_dtd_element);
-static PHP_FUNCTION(xmlwriter_write_dtd_element);
-static PHP_FUNCTION(xmlwriter_start_dtd_attlist);
-static PHP_FUNCTION(xmlwriter_end_dtd_attlist);
-static PHP_FUNCTION(xmlwriter_write_dtd_attlist);
-static PHP_FUNCTION(xmlwriter_start_dtd_entity);
-static PHP_FUNCTION(xmlwriter_end_dtd_entity);
-static PHP_FUNCTION(xmlwriter_write_dtd_entity);
-static PHP_FUNCTION(xmlwriter_open_uri);
-static PHP_FUNCTION(xmlwriter_open_memory);
-static PHP_FUNCTION(xmlwriter_output_memory);
-static PHP_FUNCTION(xmlwriter_flush);
static zend_class_entry *xmlwriter_class_entry_ce;
@@ -137,102 +94,6 @@ static zend_object *xmlwriter_object_new(zend_class_entry *class_type)
RETURN_FALSE; \
} \
-/* {{{ xmlwriter_functions */
-static const zend_function_entry xmlwriter_functions[] = {
- PHP_FE(xmlwriter_open_uri, arginfo_xmlwriter_open_uri)
- PHP_FE(xmlwriter_open_memory, arginfo_xmlwriter_open_memory)
- PHP_FE(xmlwriter_set_indent, arginfo_xmlwriter_set_indent)
- PHP_FE(xmlwriter_set_indent_string, arginfo_xmlwriter_set_indent_string)
- PHP_FE(xmlwriter_start_comment, arginfo_xmlwriter_start_comment)
- PHP_FE(xmlwriter_end_comment, arginfo_xmlwriter_end_comment)
- PHP_FE(xmlwriter_start_attribute, arginfo_xmlwriter_start_attribute)
- PHP_FE(xmlwriter_end_attribute, arginfo_xmlwriter_end_attribute)
- PHP_FE(xmlwriter_write_attribute, arginfo_xmlwriter_write_attribute)
- PHP_FE(xmlwriter_start_attribute_ns,arginfo_xmlwriter_start_attribute_ns)
- PHP_FE(xmlwriter_write_attribute_ns,arginfo_xmlwriter_write_attribute_ns)
- PHP_FE(xmlwriter_start_element, arginfo_xmlwriter_start_element)
- PHP_FE(xmlwriter_end_element, arginfo_xmlwriter_end_element)
- PHP_FE(xmlwriter_full_end_element, arginfo_xmlwriter_full_end_element)
- PHP_FE(xmlwriter_start_element_ns, arginfo_xmlwriter_start_element_ns)
- PHP_FE(xmlwriter_write_element, arginfo_xmlwriter_write_element)
- PHP_FE(xmlwriter_write_element_ns, arginfo_xmlwriter_write_element_ns)
- PHP_FE(xmlwriter_start_pi, arginfo_xmlwriter_start_pi)
- PHP_FE(xmlwriter_end_pi, arginfo_xmlwriter_end_pi)
- PHP_FE(xmlwriter_write_pi, arginfo_xmlwriter_write_pi)
- PHP_FE(xmlwriter_start_cdata, arginfo_xmlwriter_start_cdata)
- PHP_FE(xmlwriter_end_cdata, arginfo_xmlwriter_end_cdata)
- PHP_FE(xmlwriter_write_cdata, arginfo_xmlwriter_write_cdata)
- PHP_FE(xmlwriter_text, arginfo_xmlwriter_text)
- PHP_FE(xmlwriter_write_raw, arginfo_xmlwriter_write_raw)
- PHP_FE(xmlwriter_start_document, arginfo_xmlwriter_start_document)
- PHP_FE(xmlwriter_end_document, arginfo_xmlwriter_end_document)
- PHP_FE(xmlwriter_write_comment, arginfo_xmlwriter_write_comment)
- PHP_FE(xmlwriter_start_dtd, arginfo_xmlwriter_start_dtd)
- PHP_FE(xmlwriter_end_dtd, arginfo_xmlwriter_end_dtd)
- PHP_FE(xmlwriter_write_dtd, arginfo_xmlwriter_write_dtd)
- PHP_FE(xmlwriter_start_dtd_element, arginfo_xmlwriter_start_dtd_element)
- PHP_FE(xmlwriter_end_dtd_element, arginfo_xmlwriter_end_dtd_element)
- PHP_FE(xmlwriter_write_dtd_element, arginfo_xmlwriter_write_dtd_element)
- PHP_FE(xmlwriter_start_dtd_attlist, arginfo_xmlwriter_start_dtd_attlist)
- PHP_FE(xmlwriter_end_dtd_attlist, arginfo_xmlwriter_end_dtd_attlist)
- PHP_FE(xmlwriter_write_dtd_attlist, arginfo_xmlwriter_write_dtd_attlist)
- PHP_FE(xmlwriter_start_dtd_entity, arginfo_xmlwriter_start_dtd_entity)
- PHP_FE(xmlwriter_end_dtd_entity, arginfo_xmlwriter_end_dtd_entity)
- PHP_FE(xmlwriter_write_dtd_entity, arginfo_xmlwriter_write_dtd_entity)
- PHP_FE(xmlwriter_output_memory, arginfo_xmlwriter_output_memory)
- PHP_FE(xmlwriter_flush, arginfo_xmlwriter_flush)
- PHP_FE_END
-};
-/* }}} */
-
-/* {{{ xmlwriter_class_functions */
-static const zend_function_entry xmlwriter_class_functions[] = {
- PHP_ME_MAPPING(openUri, xmlwriter_open_uri, arginfo_class_XMLWriter_openUri, 0)
- PHP_ME_MAPPING(openMemory, xmlwriter_open_memory, arginfo_class_XMLWriter_openMemory, 0)
- PHP_ME_MAPPING(setIndent, xmlwriter_set_indent, arginfo_class_XMLWriter_setIndent, 0)
- PHP_ME_MAPPING(setIndentString, xmlwriter_set_indent_string, arginfo_class_XMLWriter_setIdentString, 0)
- PHP_ME_MAPPING(startComment, xmlwriter_start_comment, arginfo_class_XMLWriter_startComment, 0)
- PHP_ME_MAPPING(endComment, xmlwriter_end_comment, arginfo_class_XMLWriter_endComment, 0)
- PHP_ME_MAPPING(startAttribute, xmlwriter_start_attribute, arginfo_class_XMLWriter_startAttribute, 0)
- PHP_ME_MAPPING(endAttribute, xmlwriter_end_attribute, arginfo_class_XMLWriter_endAttribute, 0)
- PHP_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, arginfo_class_XMLWriter_writeAttribute, 0)
- PHP_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns,arginfo_class_XMLWriter_startAttributeNs, 0)
- PHP_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns,arginfo_class_XMLWriter_writeAttributeNs, 0)
- PHP_ME_MAPPING(startElement, xmlwriter_start_element, arginfo_class_XMLWriter_startElement, 0)
- PHP_ME_MAPPING(endElement, xmlwriter_end_element, arginfo_class_XMLWriter_endElement, 0)
- PHP_ME_MAPPING(fullEndElement, xmlwriter_full_end_element, arginfo_class_XMLWriter_fullEndElement, 0)
- PHP_ME_MAPPING(startElementNs, xmlwriter_start_element_ns, arginfo_class_XMLWriter_startElementNs, 0)
- PHP_ME_MAPPING(writeElement, xmlwriter_write_element, arginfo_class_XMLWriter_writeElement, 0)
- PHP_ME_MAPPING(writeElementNs, xmlwriter_write_element_ns, arginfo_class_XMLWriter_writeElementNs, 0)
- PHP_ME_MAPPING(startPi, xmlwriter_start_pi, arginfo_class_XMLWriter_startPi, 0)
- PHP_ME_MAPPING(endPi, xmlwriter_end_pi, arginfo_class_XMLWriter_endPi, 0)
- PHP_ME_MAPPING(writePi, xmlwriter_write_pi, arginfo_class_XMLWriter_writePi, 0)
- PHP_ME_MAPPING(startCdata, xmlwriter_start_cdata, arginfo_class_XMLWriter_startCdata, 0)
- PHP_ME_MAPPING(endCdata, xmlwriter_end_cdata, arginfo_class_XMLWriter_endCdata, 0)
- PHP_ME_MAPPING(writeCdata, xmlwriter_write_cdata, arginfo_class_XMLWriter_writeCdata, 0)
- PHP_ME_MAPPING(text, xmlwriter_text, arginfo_class_XMLWriter_text, 0)
- PHP_ME_MAPPING(writeRaw, xmlwriter_write_raw, arginfo_class_XMLWriter_writeRaw, 0)
- PHP_ME_MAPPING(startDocument, xmlwriter_start_document, arginfo_class_XMLWriter_startDocument, 0)
- PHP_ME_MAPPING(endDocument, xmlwriter_end_document, arginfo_class_XMLWriter_endDocument, 0)
- PHP_ME_MAPPING(writeComment, xmlwriter_write_comment, arginfo_class_XMLWriter_writeComment, 0)
- PHP_ME_MAPPING(startDtd, xmlwriter_start_dtd, arginfo_class_XMLWriter_startDtd, 0)
- PHP_ME_MAPPING(endDtd, xmlwriter_end_dtd, arginfo_class_XMLWriter_endDtd, 0)
- PHP_ME_MAPPING(writeDtd, xmlwriter_write_dtd, arginfo_class_XMLWriter_writeDtd, 0)
- PHP_ME_MAPPING(startDtdElement, xmlwriter_start_dtd_element,arginfo_class_XMLWriter_startDtdElement, 0)
- PHP_ME_MAPPING(endDtdElement, xmlwriter_end_dtd_element, arginfo_class_XMLWriter_endDtdElement, 0)
- PHP_ME_MAPPING(writeDtdElement, xmlwriter_write_dtd_element, arginfo_class_XMLWriter_writeDtdElement, 0)
- PHP_ME_MAPPING(startDtdAttlist, xmlwriter_start_dtd_attlist, arginfo_class_XMLWriter_startDtdAttlist, 0)
- PHP_ME_MAPPING(endDtdAttlist, xmlwriter_end_dtd_attlist, arginfo_class_XMLWriter_endDtdAttlist, 0)
- PHP_ME_MAPPING(writeDtdAttlist, xmlwriter_write_dtd_attlist, arginfo_class_XMLWriter_writeDtdAttlist, 0)
- PHP_ME_MAPPING(startDtdEntity, xmlwriter_start_dtd_entity, arginfo_class_XMLWriter_startDtdEntity, 0)
- PHP_ME_MAPPING(endDtdEntity, xmlwriter_end_dtd_entity, arginfo_class_XMLWriter_endDtdEntity, 0)
- PHP_ME_MAPPING(writeDtdEntity, xmlwriter_write_dtd_entity, arginfo_class_XMLWriter_writeDtdEntity, 0)
- PHP_ME_MAPPING(outputMemory, xmlwriter_output_memory, arginfo_class_XMLWriter_outputMemory, 0)
- PHP_ME_MAPPING(flush, xmlwriter_flush, arginfo_class_XMLWriter_flush, 0)
- PHP_FE_END
-};
-/* }}} */
-
/* {{{ function prototypes */
static PHP_MINIT_FUNCTION(xmlwriter);
static PHP_MSHUTDOWN_FUNCTION(xmlwriter);
@@ -317,7 +178,7 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i
zend_module_entry xmlwriter_module_entry = {
STANDARD_MODULE_HEADER,
"xmlwriter",
- xmlwriter_functions,
+ ext_functions,
PHP_MINIT(xmlwriter),
PHP_MSHUTDOWN(xmlwriter),
NULL,
@@ -389,7 +250,7 @@ static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t
/* {{{ proto bool xmlwriter_set_indent(XMLWriter xmlwriter, bool indent)
Toggle indentation on/off - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_set_indent)
+PHP_FUNCTION(xmlwriter_set_indent)
{
xmlTextWriterPtr ptr;
int retval;
@@ -414,7 +275,7 @@ static PHP_FUNCTION(xmlwriter_set_indent)
/* {{{ proto bool xmlwriter_set_indent_string(XMLWriter xmlwriter, string indentString)
Set string used for indenting - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_set_indent_string)
+PHP_FUNCTION(xmlwriter_set_indent_string)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterSetIndentString, NULL);
}
@@ -422,7 +283,7 @@ static PHP_FUNCTION(xmlwriter_set_indent_string)
/* {{{ proto bool xmlwriter_start_attribute(XMLWriter xmlwriter, string name)
Create start attribute - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_attribute)
+PHP_FUNCTION(xmlwriter_start_attribute)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartAttribute, "Invalid Attribute Name");
}
@@ -430,7 +291,7 @@ static PHP_FUNCTION(xmlwriter_start_attribute)
/* {{{ proto bool xmlwriter_end_attribute(XMLWriter xmlwriter)
End attribute - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_attribute)
+PHP_FUNCTION(xmlwriter_end_attribute)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndAttribute);
}
@@ -438,7 +299,7 @@ static PHP_FUNCTION(xmlwriter_end_attribute)
/* {{{ proto bool xmlwriter_start_attribute_ns(XMLWriter xmlwriter, string prefix, string name, string uri)
Create start namespaced attribute - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_attribute_ns)
+PHP_FUNCTION(xmlwriter_start_attribute_ns)
{
xmlTextWriterPtr ptr;
char *name, *prefix, *uri;
@@ -467,7 +328,7 @@ static PHP_FUNCTION(xmlwriter_start_attribute_ns)
/* {{{ proto bool xmlwriter_write_attribute(XMLWriter xmlwriter, string name, string content)
Write full attribute - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_attribute)
+PHP_FUNCTION(xmlwriter_write_attribute)
{
xmlTextWriterPtr ptr;
char *name, *content;
@@ -496,7 +357,7 @@ static PHP_FUNCTION(xmlwriter_write_attribute)
/* {{{ proto bool xmlwriter_write_attribute_ns(XMLWriter xmlwriter, string prefix, string name, string uri, string content)
Write full namespaced attribute - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_attribute_ns)
+PHP_FUNCTION(xmlwriter_write_attribute_ns)
{
xmlTextWriterPtr ptr;
char *name, *prefix, *uri, *content;
@@ -525,7 +386,7 @@ static PHP_FUNCTION(xmlwriter_write_attribute_ns)
/* {{{ proto bool xmlwriter_start_element(XMLWriter xmlwriter, string name)
Create start element tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_element)
+PHP_FUNCTION(xmlwriter_start_element)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartElement, "Invalid Element Name");
}
@@ -533,7 +394,7 @@ static PHP_FUNCTION(xmlwriter_start_element)
/* {{{ proto bool xmlwriter_start_element_ns(XMLWriter xmlwriter, string prefix, string name, string uri)
Create start namespaced element tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_element_ns)
+PHP_FUNCTION(xmlwriter_start_element_ns)
{
xmlTextWriterPtr ptr;
char *name, *prefix, *uri;
@@ -563,7 +424,7 @@ static PHP_FUNCTION(xmlwriter_start_element_ns)
/* {{{ proto bool xmlwriter_end_element(XMLWriter xmlwriter)
End current element - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_element)
+PHP_FUNCTION(xmlwriter_end_element)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndElement);
}
@@ -571,7 +432,7 @@ static PHP_FUNCTION(xmlwriter_end_element)
/* {{{ proto bool xmlwriter_full_end_element(XMLWriter xmlwriter)
End current element - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_full_end_element)
+PHP_FUNCTION(xmlwriter_full_end_element)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterFullEndElement);
}
@@ -579,7 +440,7 @@ static PHP_FUNCTION(xmlwriter_full_end_element)
/* {{{ proto bool xmlwriter_write_element(XMLWriter xmlwriter, string name[, string content])
Write full element tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_element)
+PHP_FUNCTION(xmlwriter_write_element)
{
xmlTextWriterPtr ptr;
char *name, *content = NULL;
@@ -619,7 +480,7 @@ static PHP_FUNCTION(xmlwriter_write_element)
/* {{{ proto bool xmlwriter_write_element_ns(XMLWriter xmlwriter, string prefix, string name, string uri[, string content])
Write full namesapced element tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_element_ns)
+PHP_FUNCTION(xmlwriter_write_element_ns)
{
xmlTextWriterPtr ptr;
char *name, *prefix, *uri, *content = NULL;
@@ -659,7 +520,7 @@ static PHP_FUNCTION(xmlwriter_write_element_ns)
/* {{{ proto bool xmlwriter_start_pi(XMLWriter xmlwriter, string target)
Create start PI tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_pi)
+PHP_FUNCTION(xmlwriter_start_pi)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartPI, "Invalid PI Target");
}
@@ -667,7 +528,7 @@ static PHP_FUNCTION(xmlwriter_start_pi)
/* {{{ proto bool xmlwriter_end_pi(XMLWriter xmlwriter)
End current PI - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_pi)
+PHP_FUNCTION(xmlwriter_end_pi)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndPI);
}
@@ -675,7 +536,7 @@ static PHP_FUNCTION(xmlwriter_end_pi)
/* {{{ proto bool xmlwriter_write_pi(XMLWriter xmlwriter, string target, string content)
Write full PI tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_pi)
+PHP_FUNCTION(xmlwriter_write_pi)
{
xmlTextWriterPtr ptr;
char *name, *content;
@@ -704,7 +565,7 @@ static PHP_FUNCTION(xmlwriter_write_pi)
/* {{{ proto bool xmlwriter_start_cdata(XMLWriter xmlwriter)
Create start CDATA tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_cdata)
+PHP_FUNCTION(xmlwriter_start_cdata)
{
xmlTextWriterPtr ptr;
int retval;
@@ -728,7 +589,7 @@ static PHP_FUNCTION(xmlwriter_start_cdata)
/* {{{ proto bool xmlwriter_end_cdata(XMLWriter xmlwriter)
End current CDATA - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_cdata)
+PHP_FUNCTION(xmlwriter_end_cdata)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndCDATA);
}
@@ -736,7 +597,7 @@ static PHP_FUNCTION(xmlwriter_end_cdata)
/* {{{ proto bool xmlwriter_write_cdata(XMLWriter xmlwriter, string content)
Write full CDATA tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_cdata)
+PHP_FUNCTION(xmlwriter_write_cdata)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteCDATA, NULL);
}
@@ -744,7 +605,7 @@ static PHP_FUNCTION(xmlwriter_write_cdata)
/* {{{ proto bool xmlwriter_write_raw(XMLWriter xmlwriter, string content)
Write text - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_raw)
+PHP_FUNCTION(xmlwriter_write_raw)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteRaw, NULL);
}
@@ -752,7 +613,7 @@ static PHP_FUNCTION(xmlwriter_write_raw)
/* {{{ proto bool xmlwriter_text(XMLWriter xmlwriter, string content)
Write text - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_text)
+PHP_FUNCTION(xmlwriter_text)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteString, NULL);
}
@@ -760,7 +621,7 @@ static PHP_FUNCTION(xmlwriter_text)
/* {{{ proto bool xmlwriter_start_comment(XMLWriter xmlwriter)
Create start comment - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_comment)
+PHP_FUNCTION(xmlwriter_start_comment)
{
xmlTextWriterPtr ptr;
int retval;
@@ -784,7 +645,7 @@ static PHP_FUNCTION(xmlwriter_start_comment)
/* {{{ proto bool xmlwriter_end_comment(XMLWriter xmlwriter)
Create end comment - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_comment)
+PHP_FUNCTION(xmlwriter_end_comment)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndComment);
}
@@ -792,7 +653,7 @@ static PHP_FUNCTION(xmlwriter_end_comment)
/* {{{ proto bool xmlwriter_write_comment(XMLWriter xmlwriter, string content)
Write full comment tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_comment)
+PHP_FUNCTION(xmlwriter_write_comment)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteComment, NULL);
}
@@ -800,7 +661,7 @@ static PHP_FUNCTION(xmlwriter_write_comment)
/* {{{ proto bool xmlwriter_start_document(XMLWriter xmlwriter, string version, string encoding, string standalone)
Create document tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_document)
+PHP_FUNCTION(xmlwriter_start_document)
{
xmlTextWriterPtr ptr;
char *version = NULL, *enc = NULL, *alone = NULL;
@@ -826,7 +687,7 @@ static PHP_FUNCTION(xmlwriter_start_document)
/* {{{ proto bool xmlwriter_end_document(XMLWriter xmlwriter)
End current document - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_document)
+PHP_FUNCTION(xmlwriter_end_document)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDocument);
}
@@ -834,7 +695,7 @@ static PHP_FUNCTION(xmlwriter_end_document)
/* {{{ proto bool xmlwriter_start_dtd(XMLWriter xmlwriter, string name, string pubid, string sysid)
Create start DTD tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_dtd)
+PHP_FUNCTION(xmlwriter_start_dtd)
{
xmlTextWriterPtr ptr;
char *name, *pubid = NULL, *sysid = NULL;
@@ -860,7 +721,7 @@ static PHP_FUNCTION(xmlwriter_start_dtd)
/* {{{ proto bool xmlwriter_end_dtd(XMLWriter xmlwriter)
End current DTD - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_dtd)
+PHP_FUNCTION(xmlwriter_end_dtd)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTD);
}
@@ -868,7 +729,7 @@ static PHP_FUNCTION(xmlwriter_end_dtd)
/* {{{ proto bool xmlwriter_write_dtd(XMLWriter xmlwriter, string name, string pubid, string sysid, string subset)
Write full DTD tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_dtd)
+PHP_FUNCTION(xmlwriter_write_dtd)
{
xmlTextWriterPtr ptr;
char *name, *pubid = NULL, *sysid = NULL, *subset = NULL;
@@ -894,7 +755,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd)
/* {{{ proto bool xmlwriter_start_dtd_element(XMLWriter xmlwriter, string name)
Create start DTD element - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_dtd_element)
+PHP_FUNCTION(xmlwriter_start_dtd_element)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "Invalid Element Name");
}
@@ -902,7 +763,7 @@ static PHP_FUNCTION(xmlwriter_start_dtd_element)
/* {{{ proto bool xmlwriter_end_dtd_element(XMLWriter xmlwriter)
End current DTD element - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_dtd_element)
+PHP_FUNCTION(xmlwriter_end_dtd_element)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDElement);
}
@@ -910,7 +771,7 @@ static PHP_FUNCTION(xmlwriter_end_dtd_element)
/* {{{ proto bool xmlwriter_write_dtd_element(XMLWriter xmlwriter, string name, string content)
Write full DTD element tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_dtd_element)
+PHP_FUNCTION(xmlwriter_write_dtd_element)
{
xmlTextWriterPtr ptr;
char *name, *content;
@@ -939,7 +800,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_element)
/* {{{ proto bool xmlwriter_start_dtd_attlist(XMLWriter xmlwriter, string name)
Create start DTD AttList - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_dtd_attlist)
+PHP_FUNCTION(xmlwriter_start_dtd_attlist)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "Invalid Element Name");
}
@@ -947,7 +808,7 @@ static PHP_FUNCTION(xmlwriter_start_dtd_attlist)
/* {{{ proto bool xmlwriter_end_dtd_attlist(XMLWriter xmlwriter)
End current DTD AttList - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_dtd_attlist)
+PHP_FUNCTION(xmlwriter_end_dtd_attlist)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDAttlist);
}
@@ -955,7 +816,7 @@ static PHP_FUNCTION(xmlwriter_end_dtd_attlist)
/* {{{ proto bool xmlwriter_write_dtd_attlist(XMLWriter xmlwriter, string name, string content)
Write full DTD AttList tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_dtd_attlist)
+PHP_FUNCTION(xmlwriter_write_dtd_attlist)
{
xmlTextWriterPtr ptr;
char *name, *content;
@@ -984,7 +845,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_attlist)
/* {{{ proto bool xmlwriter_start_dtd_entity(XMLWriter xmlwriter, string name, bool isparam)
Create start DTD Entity - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_start_dtd_entity)
+PHP_FUNCTION(xmlwriter_start_dtd_entity)
{
xmlTextWriterPtr ptr;
char *name;
@@ -1013,7 +874,7 @@ static PHP_FUNCTION(xmlwriter_start_dtd_entity)
/* {{{ proto bool xmlwriter_end_dtd_entity(XMLWriter xmlwriter)
End current DTD Entity - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_end_dtd_entity)
+PHP_FUNCTION(xmlwriter_end_dtd_entity)
{
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDEntity);
}
@@ -1021,7 +882,7 @@ static PHP_FUNCTION(xmlwriter_end_dtd_entity)
/* {{{ proto bool xmlwriter_write_dtd_entity(XMLWriter xmlwriter, string name, string content [, bool pe [, string pubid [, string sysid [, string ndataid]]]])
Write full DTD Entity tag - returns FALSE on error */
-static PHP_FUNCTION(xmlwriter_write_dtd_entity)
+PHP_FUNCTION(xmlwriter_write_dtd_entity)
{
xmlTextWriterPtr ptr;
char *name, *content;
@@ -1055,7 +916,7 @@ static PHP_FUNCTION(xmlwriter_write_dtd_entity)
/* {{{ proto XMLWriter xmlwriter_open_uri(string source)
Create new xmlwriter using source uri for output */
-static PHP_FUNCTION(xmlwriter_open_uri)
+PHP_FUNCTION(xmlwriter_open_uri)
{
char *valid_file = NULL;
xmlTextWriterPtr ptr;
@@ -1112,7 +973,7 @@ static PHP_FUNCTION(xmlwriter_open_uri)
/* {{{ proto XMLWriter xmlwriter_open_memory()
Create new xmlwriter using memory for string output */
-static PHP_FUNCTION(xmlwriter_open_memory)
+PHP_FUNCTION(xmlwriter_open_memory)
{
xmlTextWriterPtr ptr;
xmlBufferPtr buffer;
@@ -1197,7 +1058,7 @@ static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string)
/* {{{ proto string xmlwriter_output_memory(XMLWriter xmlwriter [,bool flush])
Output current buffer as string */
-static PHP_FUNCTION(xmlwriter_output_memory)
+PHP_FUNCTION(xmlwriter_output_memory)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
@@ -1205,7 +1066,7 @@ static PHP_FUNCTION(xmlwriter_output_memory)
/* {{{ proto mixed xmlwriter_flush(XMLWriter xmlwriter [,bool empty])
Output current buffer */
-static PHP_FUNCTION(xmlwriter_flush)
+PHP_FUNCTION(xmlwriter_flush)
{
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
@@ -1222,7 +1083,7 @@ static PHP_MINIT_FUNCTION(xmlwriter)
xmlwriter_object_handlers.dtor_obj = xmlwriter_object_dtor;
xmlwriter_object_handlers.free_obj = xmlwriter_object_free_storage;
xmlwriter_object_handlers.clone_obj = NULL;
- INIT_CLASS_ENTRY(ce, "XMLWriter", xmlwriter_class_functions);
+ INIT_CLASS_ENTRY(ce, "XMLWriter", class_XMLWriter_methods);
ce.create_object = xmlwriter_object_new;
xmlwriter_class_entry_ce = zend_register_internal_class(&ce);
diff --git a/ext/xmlwriter/xmlwriter.stub.php b/ext/xmlwriter/php_xmlwriter.stub.php
index 7dc6bc47bd..8dcf62c61a 100644
--- a/ext/xmlwriter/xmlwriter.stub.php
+++ b/ext/xmlwriter/php_xmlwriter.stub.php
@@ -1,5 +1,7 @@
<?php
+/** @generate-function-entries */
+
function xmlwriter_open_uri(string $uri): XMLWriter|false {}
function xmlwriter_open_memory(): XMLWriter|false {}
@@ -86,87 +88,129 @@ function xmlwriter_flush(XMLWriter $xmlwriter, bool $empty = true): string|int {
class XMLWriter
{
+ /** @alias xmlwriter_open_uri */
public function openUri(string $uri): bool {}
+ /** @alias xmlwriter_open_memory */
public function openMemory(): bool {}
+ /** @alias xmlwriter_set_indent */
public function setIndent(bool $indent): bool {}
- public function setIdentString(string $indentString): bool {}
+ /** @alias xmlwriter_set_indent_string */
+ public function setIndentString(string $indentString): bool {}
+ /** @alias xmlwriter_start_comment */
public function startComment(): bool {}
+ /** @alias xmlwriter_end_comment */
public function endComment(): bool {}
+ /** @alias xmlwriter_start_attribute */
public function startAttribute(string $name): bool {}
+ /** @alias xmlwriter_end_attribute */
public function endAttribute(): bool {}
+ /** @alias xmlwriter_write_attribute */
public function writeAttribute(string $name, string $value): bool {}
+ /** @alias xmlwriter_start_attribute_ns */
public function startAttributeNs(string $prefix, string $name, ?string $uri): bool {}
+ /** @alias xmlwriter_write_attribute_ns */
public function writeAttributeNs(string $prefix, string $name, ?string $uri, string $content): bool {}
+ /** @alias xmlwriter_start_element */
public function startElement(string $name): bool {}
+ /** @alias xmlwriter_end_element */
public function endElement(): bool {}
+ /** @alias xmlwriter_full_end_element */
public function fullEndElement(): bool {}
+ /** @alias xmlwriter_start_element_ns */
public function startElementNs(?string $prefix, string $name, ?string $uri): bool {}
+ /** @alias xmlwriter_write_element */
public function writeElement(string $name, ?string $content = null): bool {}
+ /** @alias xmlwriter_write_element_ns */
public function writeElementNs(?string $prefix, string $name, ?string $uri, ?string $content = null): bool {}
+ /** @alias xmlwriter_start_pi */
public function startPi(string $target): bool {}
+ /** @alias xmlwriter_end_pi */
public function endPi(): bool {}
+ /** @alias xmlwriter_write_pi */
public function writePi(string $target, string $content): bool {}
+ /** @alias xmlwriter_start_cdata */
public function startCdata(): bool {}
+ /** @alias xmlwriter_end_cdata */
public function endCdata(): bool {}
+ /** @alias xmlwriter_write_cdata */
public function writeCdata(string $content): bool {}
+ /** @alias xmlwriter_text */
public function text(string $content): bool {}
+ /** @alias xmlwriter_write_raw */
public function writeRaw(string $content): bool {}
+ /** @alias xmlwriter_start_document */
public function startDocument(?string $version = '1.0', ?string $encoding = null, ?string $standalone = null): bool {}
+ /** @alias xmlwriter_end_document */
public function endDocument(): bool {}
+ /** @alias xmlwriter_write_comment */
public function writeComment(string $content): bool {}
+ /** @alias xmlwriter_start_dtd */
public function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null): bool {}
+ /** @alias xmlwriter_end_dtd */
public function endDtd(): bool {}
+ /** @alias xmlwriter_write_dtd */
public function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $subset = null): bool {}
+ /** @alias xmlwriter_start_dtd_element */
public function startDtdElement(string $qualifiedName): bool {}
+ /** @alias xmlwriter_end_dtd_element */
public function endDtdElement(): bool {}
+ /** @alias xmlwriter_write_dtd_element */
public function writeDtdElement(string $name, string $content): bool {}
+ /** @alias xmlwriter_start_dtd_attlist */
public function startDtdAttlist(string $name): bool {}
+ /** @alias xmlwriter_end_dtd_attlist */
public function endDtdAttlist(): bool {}
+ /** @alias xmlwriter_write_dtd_attlist */
public function writeDtdAttlist(string $name, string $content): bool {}
+ /** @alias xmlwriter_start_dtd_entity */
public function startDtdEntity(string $name, bool $isparam): bool {}
+ /** @alias xmlwriter_end_dtd_entity */
public function endDtdEntity(): bool {}
+ /** @alias xmlwriter_write_dtd_entity */
public function writeDtdEntity(string $name, string $content, bool $isparam, string $publicId = UNKNOWN, string $systemId = UNKNOWN, string $ndataid = UNKNOWN): bool {}
+ /** @alias xmlwriter_output_memory */
public function outputMemory(bool $flush = true): string {}
+ /** @alias xmlwriter_flush */
public function flush(bool $empty = true): string|int {}
}
diff --git a/ext/xmlwriter/xmlwriter_arginfo.h b/ext/xmlwriter/php_xmlwriter_arginfo.h
index 94a621750e..b4fa830575 100644
--- a/ext/xmlwriter/xmlwriter_arginfo.h
+++ b/ext/xmlwriter/php_xmlwriter_arginfo.h
@@ -190,7 +190,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_setIndent, 0, 1,
ZEND_ARG_TYPE_INFO(0, indent, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_setIdentString, 0, 1, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_setIndentString, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, indentString, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -334,3 +334,141 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_XMLWriter_flush, 0, 0, MAY_BE_STRING|MAY_BE_LONG)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, empty, _IS_BOOL, 0, "true")
ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(xmlwriter_open_uri);
+ZEND_FUNCTION(xmlwriter_open_memory);
+ZEND_FUNCTION(xmlwriter_set_indent);
+ZEND_FUNCTION(xmlwriter_set_indent_string);
+ZEND_FUNCTION(xmlwriter_start_comment);
+ZEND_FUNCTION(xmlwriter_end_comment);
+ZEND_FUNCTION(xmlwriter_start_attribute);
+ZEND_FUNCTION(xmlwriter_end_attribute);
+ZEND_FUNCTION(xmlwriter_write_attribute);
+ZEND_FUNCTION(xmlwriter_start_attribute_ns);
+ZEND_FUNCTION(xmlwriter_write_attribute_ns);
+ZEND_FUNCTION(xmlwriter_start_element);
+ZEND_FUNCTION(xmlwriter_end_element);
+ZEND_FUNCTION(xmlwriter_full_end_element);
+ZEND_FUNCTION(xmlwriter_start_element_ns);
+ZEND_FUNCTION(xmlwriter_write_element);
+ZEND_FUNCTION(xmlwriter_write_element_ns);
+ZEND_FUNCTION(xmlwriter_start_pi);
+ZEND_FUNCTION(xmlwriter_end_pi);
+ZEND_FUNCTION(xmlwriter_write_pi);
+ZEND_FUNCTION(xmlwriter_start_cdata);
+ZEND_FUNCTION(xmlwriter_end_cdata);
+ZEND_FUNCTION(xmlwriter_write_cdata);
+ZEND_FUNCTION(xmlwriter_text);
+ZEND_FUNCTION(xmlwriter_write_raw);
+ZEND_FUNCTION(xmlwriter_start_document);
+ZEND_FUNCTION(xmlwriter_end_document);
+ZEND_FUNCTION(xmlwriter_write_comment);
+ZEND_FUNCTION(xmlwriter_start_dtd);
+ZEND_FUNCTION(xmlwriter_end_dtd);
+ZEND_FUNCTION(xmlwriter_write_dtd);
+ZEND_FUNCTION(xmlwriter_start_dtd_element);
+ZEND_FUNCTION(xmlwriter_end_dtd_element);
+ZEND_FUNCTION(xmlwriter_write_dtd_element);
+ZEND_FUNCTION(xmlwriter_start_dtd_attlist);
+ZEND_FUNCTION(xmlwriter_end_dtd_attlist);
+ZEND_FUNCTION(xmlwriter_write_dtd_attlist);
+ZEND_FUNCTION(xmlwriter_start_dtd_entity);
+ZEND_FUNCTION(xmlwriter_end_dtd_entity);
+ZEND_FUNCTION(xmlwriter_write_dtd_entity);
+ZEND_FUNCTION(xmlwriter_output_memory);
+ZEND_FUNCTION(xmlwriter_flush);
+
+
+static const zend_function_entry ext_functions[] = {
+ ZEND_FE(xmlwriter_open_uri, arginfo_xmlwriter_open_uri)
+ ZEND_FE(xmlwriter_open_memory, arginfo_xmlwriter_open_memory)
+ ZEND_FE(xmlwriter_set_indent, arginfo_xmlwriter_set_indent)
+ ZEND_FE(xmlwriter_set_indent_string, arginfo_xmlwriter_set_indent_string)
+ ZEND_FE(xmlwriter_start_comment, arginfo_xmlwriter_start_comment)
+ ZEND_FE(xmlwriter_end_comment, arginfo_xmlwriter_end_comment)
+ ZEND_FE(xmlwriter_start_attribute, arginfo_xmlwriter_start_attribute)
+ ZEND_FE(xmlwriter_end_attribute, arginfo_xmlwriter_end_attribute)
+ ZEND_FE(xmlwriter_write_attribute, arginfo_xmlwriter_write_attribute)
+ ZEND_FE(xmlwriter_start_attribute_ns, arginfo_xmlwriter_start_attribute_ns)
+ ZEND_FE(xmlwriter_write_attribute_ns, arginfo_xmlwriter_write_attribute_ns)
+ ZEND_FE(xmlwriter_start_element, arginfo_xmlwriter_start_element)
+ ZEND_FE(xmlwriter_end_element, arginfo_xmlwriter_end_element)
+ ZEND_FE(xmlwriter_full_end_element, arginfo_xmlwriter_full_end_element)
+ ZEND_FE(xmlwriter_start_element_ns, arginfo_xmlwriter_start_element_ns)
+ ZEND_FE(xmlwriter_write_element, arginfo_xmlwriter_write_element)
+ ZEND_FE(xmlwriter_write_element_ns, arginfo_xmlwriter_write_element_ns)
+ ZEND_FE(xmlwriter_start_pi, arginfo_xmlwriter_start_pi)
+ ZEND_FE(xmlwriter_end_pi, arginfo_xmlwriter_end_pi)
+ ZEND_FE(xmlwriter_write_pi, arginfo_xmlwriter_write_pi)
+ ZEND_FE(xmlwriter_start_cdata, arginfo_xmlwriter_start_cdata)
+ ZEND_FE(xmlwriter_end_cdata, arginfo_xmlwriter_end_cdata)
+ ZEND_FE(xmlwriter_write_cdata, arginfo_xmlwriter_write_cdata)
+ ZEND_FE(xmlwriter_text, arginfo_xmlwriter_text)
+ ZEND_FE(xmlwriter_write_raw, arginfo_xmlwriter_write_raw)
+ ZEND_FE(xmlwriter_start_document, arginfo_xmlwriter_start_document)
+ ZEND_FE(xmlwriter_end_document, arginfo_xmlwriter_end_document)
+ ZEND_FE(xmlwriter_write_comment, arginfo_xmlwriter_write_comment)
+ ZEND_FE(xmlwriter_start_dtd, arginfo_xmlwriter_start_dtd)
+ ZEND_FE(xmlwriter_end_dtd, arginfo_xmlwriter_end_dtd)
+ ZEND_FE(xmlwriter_write_dtd, arginfo_xmlwriter_write_dtd)
+ ZEND_FE(xmlwriter_start_dtd_element, arginfo_xmlwriter_start_dtd_element)
+ ZEND_FE(xmlwriter_end_dtd_element, arginfo_xmlwriter_end_dtd_element)
+ ZEND_FE(xmlwriter_write_dtd_element, arginfo_xmlwriter_write_dtd_element)
+ ZEND_FE(xmlwriter_start_dtd_attlist, arginfo_xmlwriter_start_dtd_attlist)
+ ZEND_FE(xmlwriter_end_dtd_attlist, arginfo_xmlwriter_end_dtd_attlist)
+ ZEND_FE(xmlwriter_write_dtd_attlist, arginfo_xmlwriter_write_dtd_attlist)
+ ZEND_FE(xmlwriter_start_dtd_entity, arginfo_xmlwriter_start_dtd_entity)
+ ZEND_FE(xmlwriter_end_dtd_entity, arginfo_xmlwriter_end_dtd_entity)
+ ZEND_FE(xmlwriter_write_dtd_entity, arginfo_xmlwriter_write_dtd_entity)
+ ZEND_FE(xmlwriter_output_memory, arginfo_xmlwriter_output_memory)
+ ZEND_FE(xmlwriter_flush, arginfo_xmlwriter_flush)
+ ZEND_FE_END
+};
+
+
+static const zend_function_entry class_XMLWriter_methods[] = {
+ ZEND_ME_MAPPING(openUri, xmlwriter_open_uri, arginfo_class_XMLWriter_openUri, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(openMemory, xmlwriter_open_memory, arginfo_class_XMLWriter_openMemory, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(setIndent, xmlwriter_set_indent, arginfo_class_XMLWriter_setIndent, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(setIndentString, xmlwriter_set_indent_string, arginfo_class_XMLWriter_setIndentString, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startComment, xmlwriter_start_comment, arginfo_class_XMLWriter_startComment, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endComment, xmlwriter_end_comment, arginfo_class_XMLWriter_endComment, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startAttribute, xmlwriter_start_attribute, arginfo_class_XMLWriter_startAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endAttribute, xmlwriter_end_attribute, arginfo_class_XMLWriter_endAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, arginfo_class_XMLWriter_writeAttribute, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns, arginfo_class_XMLWriter_startAttributeNs, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns, arginfo_class_XMLWriter_writeAttributeNs, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startElement, xmlwriter_start_element, arginfo_class_XMLWriter_startElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endElement, xmlwriter_end_element, arginfo_class_XMLWriter_endElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(fullEndElement, xmlwriter_full_end_element, arginfo_class_XMLWriter_fullEndElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startElementNs, xmlwriter_start_element_ns, arginfo_class_XMLWriter_startElementNs, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeElement, xmlwriter_write_element, arginfo_class_XMLWriter_writeElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeElementNs, xmlwriter_write_element_ns, arginfo_class_XMLWriter_writeElementNs, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startPi, xmlwriter_start_pi, arginfo_class_XMLWriter_startPi, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endPi, xmlwriter_end_pi, arginfo_class_XMLWriter_endPi, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writePi, xmlwriter_write_pi, arginfo_class_XMLWriter_writePi, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startCdata, xmlwriter_start_cdata, arginfo_class_XMLWriter_startCdata, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endCdata, xmlwriter_end_cdata, arginfo_class_XMLWriter_endCdata, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeCdata, xmlwriter_write_cdata, arginfo_class_XMLWriter_writeCdata, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(text, xmlwriter_text, arginfo_class_XMLWriter_text, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeRaw, xmlwriter_write_raw, arginfo_class_XMLWriter_writeRaw, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startDocument, xmlwriter_start_document, arginfo_class_XMLWriter_startDocument, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endDocument, xmlwriter_end_document, arginfo_class_XMLWriter_endDocument, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeComment, xmlwriter_write_comment, arginfo_class_XMLWriter_writeComment, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startDtd, xmlwriter_start_dtd, arginfo_class_XMLWriter_startDtd, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endDtd, xmlwriter_end_dtd, arginfo_class_XMLWriter_endDtd, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeDtd, xmlwriter_write_dtd, arginfo_class_XMLWriter_writeDtd, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startDtdElement, xmlwriter_start_dtd_element, arginfo_class_XMLWriter_startDtdElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endDtdElement, xmlwriter_end_dtd_element, arginfo_class_XMLWriter_endDtdElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeDtdElement, xmlwriter_write_dtd_element, arginfo_class_XMLWriter_writeDtdElement, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startDtdAttlist, xmlwriter_start_dtd_attlist, arginfo_class_XMLWriter_startDtdAttlist, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endDtdAttlist, xmlwriter_end_dtd_attlist, arginfo_class_XMLWriter_endDtdAttlist, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeDtdAttlist, xmlwriter_write_dtd_attlist, arginfo_class_XMLWriter_writeDtdAttlist, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(startDtdEntity, xmlwriter_start_dtd_entity, arginfo_class_XMLWriter_startDtdEntity, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(endDtdEntity, xmlwriter_end_dtd_entity, arginfo_class_XMLWriter_endDtdEntity, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(writeDtdEntity, xmlwriter_write_dtd_entity, arginfo_class_XMLWriter_writeDtdEntity, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(outputMemory, xmlwriter_output_memory, arginfo_class_XMLWriter_outputMemory, ZEND_ACC_PUBLIC)
+ ZEND_ME_MAPPING(flush, xmlwriter_flush, arginfo_class_XMLWriter_flush, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+};