|
|
|
@ -29,7 +29,56 @@ |
|
|
|
#include "ext/standard/info.h" |
|
|
|
#include "php_xmlwriter.h" |
|
|
|
|
|
|
|
zend_class_entry *xmlwriter_class_entry; |
|
|
|
|
|
|
|
#if LIBXML_VERSION >= 20605 |
|
|
|
static PHP_FUNCTION(xmlwriter_set_indent); |
|
|
|
static PHP_FUNCTION(xmlwriter_set_indent_string); |
|
|
|
#endif |
|
|
|
static PHP_FUNCTION(xmlwriter_start_attribute); |
|
|
|
static PHP_FUNCTION(xmlwriter_end_attribute); |
|
|
|
static PHP_FUNCTION(xmlwriter_write_attribute); |
|
|
|
#if LIBXML_VERSION > 20617 |
|
|
|
static PHP_FUNCTION(xmlwriter_start_attribute_ns); |
|
|
|
static PHP_FUNCTION(xmlwriter_write_attribute_ns); |
|
|
|
#endif |
|
|
|
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); |
|
|
|
#if LIBXML_VERSION >= 20607 |
|
|
|
static PHP_FUNCTION(xmlwriter_start_comment); |
|
|
|
static PHP_FUNCTION(xmlwriter_end_comment); |
|
|
|
#endif |
|
|
|
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); |
|
|
|
#if LIBXML_VERSION > 20608 |
|
|
|
static PHP_FUNCTION(xmlwriter_start_dtd_attlist); |
|
|
|
static PHP_FUNCTION(xmlwriter_end_dtd_attlist); |
|
|
|
static PHP_FUNCTION(xmlwriter_write_dtd_attlist); |
|
|
|
#endif |
|
|
|
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; |
|
|
|
|
|
|
|
static void xmlwriter_free_resource_ptr(xmlwriter_object *intern TSRMLS_DC); |
|
|
|
static void xmlwriter_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); |
|
|
|
@ -88,7 +137,7 @@ static void xmlwriter_object_free_storage(void *object TSRMLS_DC) |
|
|
|
|
|
|
|
|
|
|
|
/* {{{ xmlwriter_object_new */ |
|
|
|
PHP_XMLWRITER_API zend_object_value xmlwriter_object_new(zend_class_entry *class_type TSRMLS_DC) |
|
|
|
static zend_object_value xmlwriter_object_new(zend_class_entry *class_type TSRMLS_DC) |
|
|
|
{ |
|
|
|
ze_xmlwriter_object *intern; |
|
|
|
zval *tmp; |
|
|
|
@ -233,9 +282,9 @@ static zend_function_entry xmlwriter_class_functions[] = { |
|
|
|
#endif |
|
|
|
|
|
|
|
/* {{{ function prototypes */ |
|
|
|
PHP_MINIT_FUNCTION(xmlwriter); |
|
|
|
PHP_MSHUTDOWN_FUNCTION(xmlwriter); |
|
|
|
PHP_MINFO_FUNCTION(xmlwriter); |
|
|
|
static PHP_MINIT_FUNCTION(xmlwriter); |
|
|
|
static PHP_MSHUTDOWN_FUNCTION(xmlwriter); |
|
|
|
static PHP_MINFO_FUNCTION(xmlwriter); |
|
|
|
|
|
|
|
static int le_xmlwriter; |
|
|
|
/* }}} */ |
|
|
|
@ -243,7 +292,7 @@ static int le_xmlwriter; |
|
|
|
/* _xmlwriter_get_valid_file_path should be made a |
|
|
|
common function in libxml extension as code is common to a few xml extensions */ |
|
|
|
/* {{{ _xmlwriter_get_valid_file_path */ |
|
|
|
char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) { |
|
|
|
static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) { |
|
|
|
xmlURI *uri; |
|
|
|
xmlChar *escsource; |
|
|
|
char *file_dest; |
|
|
|
@ -305,7 +354,7 @@ static void *php_xmlwriter_streams_IO_open_write_wrapper(const char *filename TS |
|
|
|
/* }}} */ |
|
|
|
|
|
|
|
/* {{{ php_xmlwriter_streams_IO_write */ |
|
|
|
int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len) |
|
|
|
static int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len) |
|
|
|
{ |
|
|
|
TSRMLS_FETCH(); |
|
|
|
return php_stream_write((php_stream*)context, buffer, len); |
|
|
|
@ -313,7 +362,7 @@ int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len) |
|
|
|
/* }}} */ |
|
|
|
|
|
|
|
/* {{{ xmlwriter_objects_clone */ |
|
|
|
int php_xmlwriter_streams_IO_close(void *context) |
|
|
|
static int php_xmlwriter_streams_IO_close(void *context) |
|
|
|
{ |
|
|
|
TSRMLS_FETCH(); |
|
|
|
return php_stream_close((php_stream*)context); |
|
|
|
@ -342,7 +391,7 @@ ZEND_GET_MODULE(xmlwriter) |
|
|
|
#endif |
|
|
|
|
|
|
|
/* {{{ xmlwriter_objects_clone */ |
|
|
|
void xmlwriter_objects_clone(void *object, void **object_clone TSRMLS_DC) |
|
|
|
static void xmlwriter_objects_clone(void *object, void **object_clone TSRMLS_DC) |
|
|
|
{ |
|
|
|
/* TODO */ |
|
|
|
} |
|
|
|
@ -434,7 +483,7 @@ static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t |
|
|
|
#if LIBXML_VERSION >= 20605 |
|
|
|
/* {{{ proto bool xmlwriter_set_indent(resource xmlwriter, bool indent) U |
|
|
|
Toggle indentation on/off - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_set_indent) |
|
|
|
static PHP_FUNCTION(xmlwriter_set_indent) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -474,7 +523,7 @@ PHP_FUNCTION(xmlwriter_set_indent) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_set_indent_string(resource xmlwriter, string indentString) U |
|
|
|
Set string used for indenting - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_set_indent_string) |
|
|
|
static PHP_FUNCTION(xmlwriter_set_indent_string) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterSetIndentString, NULL); |
|
|
|
} |
|
|
|
@ -484,7 +533,7 @@ PHP_FUNCTION(xmlwriter_set_indent_string) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_attribute(resource xmlwriter, string name) U |
|
|
|
Create start attribute - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_attribute) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_attribute) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartAttribute, "Invalid Attribute Name"); |
|
|
|
} |
|
|
|
@ -492,7 +541,7 @@ PHP_FUNCTION(xmlwriter_start_attribute) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_attribute(resource xmlwriter) U |
|
|
|
End attribute - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_attribute) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_attribute) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndAttribute); |
|
|
|
} |
|
|
|
@ -501,7 +550,7 @@ PHP_FUNCTION(xmlwriter_end_attribute) |
|
|
|
#if LIBXML_VERSION > 20617 |
|
|
|
/* {{{ proto bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri) U |
|
|
|
Create start namespaced attribute - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_attribute_ns) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_attribute_ns) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -545,7 +594,7 @@ PHP_FUNCTION(xmlwriter_start_attribute_ns) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_attribute(resource xmlwriter, string name, string content) U |
|
|
|
Write full attribute - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_attribute) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_attribute) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -590,7 +639,7 @@ PHP_FUNCTION(xmlwriter_write_attribute) |
|
|
|
#if LIBXML_VERSION > 20617 |
|
|
|
/* {{{ proto bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content) U |
|
|
|
Write full namespaced attribute - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_attribute_ns) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_attribute_ns) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -637,7 +686,7 @@ PHP_FUNCTION(xmlwriter_write_attribute_ns) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_element(resource xmlwriter, string name) U |
|
|
|
Create start element tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_element) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartElement, "Invalid Element Name"); |
|
|
|
} |
|
|
|
@ -646,7 +695,7 @@ PHP_FUNCTION(xmlwriter_start_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri) U |
|
|
|
Create start namespaced element tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_element_ns) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_element_ns) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -690,7 +739,7 @@ PHP_FUNCTION(xmlwriter_start_element_ns) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_element(resource xmlwriter) U |
|
|
|
End current element - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_element) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndElement); |
|
|
|
} |
|
|
|
@ -698,7 +747,7 @@ PHP_FUNCTION(xmlwriter_end_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_full_end_element(resource xmlwriter) U |
|
|
|
End current element - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_full_end_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_full_end_element) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterFullEndElement); |
|
|
|
} |
|
|
|
@ -706,7 +755,7 @@ PHP_FUNCTION(xmlwriter_full_end_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_element(resource xmlwriter, string name, string content) U |
|
|
|
Write full element tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_element) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -749,7 +798,7 @@ PHP_FUNCTION(xmlwriter_write_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri, string content) U |
|
|
|
Write full namesapced element tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_element_ns) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_element_ns) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -793,7 +842,7 @@ PHP_FUNCTION(xmlwriter_write_element_ns) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_pi(resource xmlwriter, string target) U |
|
|
|
Create start PI tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_pi) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_pi) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartPI, "Invalid PI Target"); |
|
|
|
} |
|
|
|
@ -801,7 +850,7 @@ PHP_FUNCTION(xmlwriter_start_pi) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_pi(resource xmlwriter) U |
|
|
|
End current PI - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_pi) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_pi) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndPI); |
|
|
|
} |
|
|
|
@ -809,7 +858,7 @@ PHP_FUNCTION(xmlwriter_end_pi) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_pi(resource xmlwriter, string target, string content) U |
|
|
|
Write full PI tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_pi) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_pi) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -853,7 +902,7 @@ PHP_FUNCTION(xmlwriter_write_pi) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_cdata(resource xmlwriter) U |
|
|
|
Create start CDATA tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_cdata) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_cdata) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -888,7 +937,7 @@ PHP_FUNCTION(xmlwriter_start_cdata) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_cdata(resource xmlwriter) U |
|
|
|
End current CDATA - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_cdata) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_cdata) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndCDATA); |
|
|
|
} |
|
|
|
@ -896,7 +945,7 @@ PHP_FUNCTION(xmlwriter_end_cdata) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_cdata(resource xmlwriter, string content) U |
|
|
|
Write full CDATA tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_cdata) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_cdata) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteCDATA, NULL); |
|
|
|
} |
|
|
|
@ -904,7 +953,7 @@ PHP_FUNCTION(xmlwriter_write_cdata) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_raw(resource xmlwriter, string content) U |
|
|
|
Write text - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_raw) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_raw) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteRaw, NULL); |
|
|
|
} |
|
|
|
@ -912,7 +961,7 @@ PHP_FUNCTION(xmlwriter_write_raw) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_text(resource xmlwriter, string content) U |
|
|
|
Write text - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_text) |
|
|
|
static PHP_FUNCTION(xmlwriter_text) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteString, NULL); |
|
|
|
} |
|
|
|
@ -921,7 +970,7 @@ PHP_FUNCTION(xmlwriter_text) |
|
|
|
#if LIBXML_VERSION >= 20607 |
|
|
|
/* {{{ proto bool xmlwriter_start_comment(resource xmlwriter) U |
|
|
|
Create start comment - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_comment) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_comment) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -956,7 +1005,7 @@ PHP_FUNCTION(xmlwriter_start_comment) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_comment(resource xmlwriter) U |
|
|
|
Create end comment - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_comment) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_comment) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndComment); |
|
|
|
} |
|
|
|
@ -966,7 +1015,7 @@ PHP_FUNCTION(xmlwriter_end_comment) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_comment(resource xmlwriter, string content) U |
|
|
|
Write full comment tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_comment) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_comment) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterWriteComment, NULL); |
|
|
|
} |
|
|
|
@ -974,7 +1023,7 @@ PHP_FUNCTION(xmlwriter_write_comment) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone) U |
|
|
|
Create document tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_document) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_document) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1018,7 +1067,7 @@ PHP_FUNCTION(xmlwriter_start_document) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_document(resource xmlwriter) U |
|
|
|
End current document - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_document) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_document) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDocument); |
|
|
|
} |
|
|
|
@ -1026,7 +1075,7 @@ PHP_FUNCTION(xmlwriter_end_document) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid) U |
|
|
|
Create start DTD tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_dtd) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_dtd) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1071,7 +1120,7 @@ PHP_FUNCTION(xmlwriter_start_dtd) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_dtd(resource xmlwriter) U |
|
|
|
End current DTD - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_dtd) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_dtd) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTD); |
|
|
|
} |
|
|
|
@ -1079,7 +1128,7 @@ PHP_FUNCTION(xmlwriter_end_dtd) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset) U |
|
|
|
Write full DTD tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_dtd) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_dtd) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1125,7 +1174,7 @@ PHP_FUNCTION(xmlwriter_write_dtd) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_dtd_element(resource xmlwriter, string name) U |
|
|
|
Create start DTD element - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_dtd_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_dtd_element) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDElement, "Invalid Element Name"); |
|
|
|
} |
|
|
|
@ -1133,7 +1182,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_dtd_element(resource xmlwriter) U |
|
|
|
End current DTD element - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_dtd_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_dtd_element) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDElement); |
|
|
|
} |
|
|
|
@ -1141,7 +1190,7 @@ PHP_FUNCTION(xmlwriter_end_dtd_element) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content) U |
|
|
|
Write full DTD element tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_dtd_element) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_dtd_element) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1186,7 +1235,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_element) |
|
|
|
#if LIBXML_VERSION > 20608 |
|
|
|
/* {{{ proto bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name) U |
|
|
|
Create start DTD AttList - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_dtd_attlist) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_dtd_attlist) |
|
|
|
{ |
|
|
|
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartDTDAttlist, "Invalid Element Name"); |
|
|
|
} |
|
|
|
@ -1194,7 +1243,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_attlist) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_dtd_attlist(resource xmlwriter) U |
|
|
|
End current DTD AttList - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_dtd_attlist) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_dtd_attlist) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDAttlist); |
|
|
|
} |
|
|
|
@ -1202,7 +1251,7 @@ PHP_FUNCTION(xmlwriter_end_dtd_attlist) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content) U |
|
|
|
Write full DTD AttList tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_dtd_attlist) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_dtd_attlist) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1247,7 +1296,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_attlist) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam) U |
|
|
|
Create start DTD Entity - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_start_dtd_entity) |
|
|
|
static PHP_FUNCTION(xmlwriter_start_dtd_entity) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1291,7 +1340,7 @@ PHP_FUNCTION(xmlwriter_start_dtd_entity) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_end_dtd_entity(resource xmlwriter) U |
|
|
|
End current DTD Entity - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_end_dtd_entity) |
|
|
|
static PHP_FUNCTION(xmlwriter_end_dtd_entity) |
|
|
|
{ |
|
|
|
php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterEndDTDEntity); |
|
|
|
} |
|
|
|
@ -1299,7 +1348,7 @@ PHP_FUNCTION(xmlwriter_end_dtd_entity) |
|
|
|
|
|
|
|
/* {{{ proto bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content) U |
|
|
|
Write full DTD Entity tag - returns FALSE on error */ |
|
|
|
PHP_FUNCTION(xmlwriter_write_dtd_entity) |
|
|
|
static PHP_FUNCTION(xmlwriter_write_dtd_entity) |
|
|
|
{ |
|
|
|
zval *pind; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1344,7 +1393,7 @@ PHP_FUNCTION(xmlwriter_write_dtd_entity) |
|
|
|
|
|
|
|
/* {{{ proto resource xmlwriter_open_uri(string source) U |
|
|
|
Create new xmlwriter using source uri for output */ |
|
|
|
PHP_FUNCTION(xmlwriter_open_uri) |
|
|
|
static PHP_FUNCTION(xmlwriter_open_uri) |
|
|
|
{ |
|
|
|
char *valid_file = NULL; |
|
|
|
xmlwriter_object *intern; |
|
|
|
@ -1446,7 +1495,7 @@ PHP_FUNCTION(xmlwriter_open_uri) |
|
|
|
|
|
|
|
/* {{{ proto resource xmlwriter_open_memory() U |
|
|
|
Create new xmlwriter using memory for string output */ |
|
|
|
PHP_FUNCTION(xmlwriter_open_memory) |
|
|
|
static PHP_FUNCTION(xmlwriter_open_memory) |
|
|
|
{ |
|
|
|
xmlwriter_object *intern; |
|
|
|
xmlTextWriterPtr ptr; |
|
|
|
@ -1547,7 +1596,7 @@ static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) |
|
|
|
|
|
|
|
/* {{{ proto string xmlwriter_output_memory(resource xmlwriter [,bool flush]) U |
|
|
|
Output current buffer as string */ |
|
|
|
PHP_FUNCTION(xmlwriter_output_memory) |
|
|
|
static PHP_FUNCTION(xmlwriter_output_memory) |
|
|
|
{ |
|
|
|
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); |
|
|
|
} |
|
|
|
@ -1555,7 +1604,7 @@ PHP_FUNCTION(xmlwriter_output_memory) |
|
|
|
|
|
|
|
/* {{{ proto mixed xmlwriter_flush(resource xmlwriter [,bool empty]) U |
|
|
|
Output current buffer */ |
|
|
|
PHP_FUNCTION(xmlwriter_flush) |
|
|
|
static PHP_FUNCTION(xmlwriter_flush) |
|
|
|
{ |
|
|
|
php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); |
|
|
|
} |
|
|
|
@ -1563,7 +1612,7 @@ PHP_FUNCTION(xmlwriter_flush) |
|
|
|
|
|
|
|
/* {{{ PHP_MINIT_FUNCTION |
|
|
|
*/ |
|
|
|
PHP_MINIT_FUNCTION(xmlwriter) |
|
|
|
static PHP_MINIT_FUNCTION(xmlwriter) |
|
|
|
{ |
|
|
|
#ifdef ZEND_ENGINE_2 |
|
|
|
zend_class_entry ce; |
|
|
|
@ -1584,7 +1633,7 @@ PHP_MINIT_FUNCTION(xmlwriter) |
|
|
|
|
|
|
|
/* {{{ PHP_MSHUTDOWN_FUNCTION |
|
|
|
*/ |
|
|
|
PHP_MSHUTDOWN_FUNCTION(xmlwriter) |
|
|
|
static PHP_MSHUTDOWN_FUNCTION(xmlwriter) |
|
|
|
{ |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
@ -1592,7 +1641,7 @@ PHP_MSHUTDOWN_FUNCTION(xmlwriter) |
|
|
|
|
|
|
|
/* {{{ PHP_MINFO_FUNCTION |
|
|
|
*/ |
|
|
|
PHP_MINFO_FUNCTION(xmlwriter) |
|
|
|
static PHP_MINFO_FUNCTION(xmlwriter) |
|
|
|
{ |
|
|
|
php_info_print_table_start(); |
|
|
|
{ |
|
|
|
|