diff options
Diffstat (limited to 'ext/simplexml/simplexml.c')
| -rw-r--r-- | ext/simplexml/simplexml.c | 334 |
1 files changed, 130 insertions, 204 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 06c504884c..22ea26ca38 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1,7 +1,5 @@ /* +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | @@ -30,6 +28,7 @@ #include "ext/standard/php_string.h" #include "php_simplexml.h" #include "php_simplexml_exports.h" +#include "simplexml_arginfo.h" #include "zend_exceptions.h" #include "zend_interfaces.h" #include "sxe.h" @@ -50,13 +49,13 @@ PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */ static php_sxe_object* php_sxe_object_new(zend_class_entry *ce, zend_function *fptr_count); static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data); static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data); -static zval *sxe_get_value(zval *z, zval *rv); static void php_sxe_iterator_dtor(zend_object_iterator *iter); static int php_sxe_iterator_valid(zend_object_iterator *iter); static zval *php_sxe_iterator_current_data(zend_object_iterator *iter); static void php_sxe_iterator_current_key(zend_object_iterator *iter, zval *key); static void php_sxe_iterator_move_forward(zend_object_iterator *iter); static void php_sxe_iterator_rewind(zend_object_iterator *iter); +static int sxe_object_cast_ex(zend_object *readobj, zval *writeobj, int type); /* {{{ _node_as_zval() */ @@ -228,7 +227,7 @@ next_iter: /* {{{ sxe_prop_dim_read() */ -static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) +static zval *sxe_prop_dim_read(zend_object *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) { php_sxe_object *sxe; char *name; @@ -238,7 +237,7 @@ static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, z int nodendx = 0; int test = 0; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (!member) { if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -369,15 +368,17 @@ long_dim: /* {{{ sxe_property_read() */ -static zval *sxe_property_read(zval *object, zval *member, int type, void **cache_slot, zval *rv) +static zval *sxe_property_read(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - return sxe_prop_dim_read(object, member, 1, 0, type, rv); + zval member; + ZVAL_STR(&member, name); + return sxe_prop_dim_read(object, &member, 1, 0, type, rv); } /* }}} */ /* {{{ sxe_dimension_read() */ -static zval *sxe_dimension_read(zval *object, zval *offset, int type, zval *rv) +static zval *sxe_dimension_read(zend_object *object, zval *offset, int type, zval *rv) { return sxe_prop_dim_read(object, offset, 0, 1, type, rv); } @@ -419,7 +420,7 @@ static void change_node_zval(xmlNodePtr node, zval *value) /* {{{ sxe_property_write() */ -static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) +static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) { php_sxe_object *sxe; xmlNodePtr node; @@ -436,7 +437,7 @@ static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bo zval tmp_zv, zval_copy; zend_string *trim_str; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (!member) { if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -525,7 +526,12 @@ long_dim: break; case IS_OBJECT: if (Z_OBJCE_P(value) == sxe_class_entry) { - value = sxe_get_value(value, &zval_copy); + if (sxe_object_cast_ex(Z_OBJ_P(value), &zval_copy, IS_STRING) == FAILURE) { + zend_error(E_ERROR, "Unable to cast node to string"); + /* FIXME: Should not be fatal */ + } + + value = &zval_copy; new_value = 1; break; } @@ -656,42 +662,41 @@ next_iter: /* {{{ sxe_property_write() */ -static zval *sxe_property_write(zval *object, zval *member, zval *value, void **cache_slot) +static zval *sxe_property_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - zval *retval = sxe_prop_dim_write(object, member, value, 1, 0, NULL); - + zval member; + ZVAL_STR(&member, name); + zval *retval = sxe_prop_dim_write(object, &member, value, 1, 0, NULL); return retval == &EG(error_zval) ? &EG(uninitialized_zval) : retval; } /* }}} */ /* {{{ sxe_dimension_write() */ -static void sxe_dimension_write(zval *object, zval *offset, zval *value) +static void sxe_dimension_write(zend_object *object, zval *offset, zval *value) { sxe_prop_dim_write(object, offset, value, 0, 1, NULL); } /* }}} */ -static zval *sxe_property_get_adr(zval *object, zval *member, int fetch_type, void **cache_slot) /* {{{ */ +static zval *sxe_property_get_adr(zend_object *object, zend_string *zname, int fetch_type, void **cache_slot) /* {{{ */ { php_sxe_object *sxe; xmlNodePtr node; zval ret; char *name; SXE_ITER type; + zval member; - if (!try_convert_to_string(member)) { - return NULL; - } - - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); - name = Z_STRVAL_P(member); + name = ZSTR_VAL(zname); node = sxe_get_element_by_name(sxe, node, &name, &type); if (node) { return NULL; } - if (sxe_prop_dim_write(object, member, NULL, 1, 0, &node) == &EG(error_zval)) { + ZVAL_STR(&member, zname); + if (sxe_prop_dim_write(object, &member, NULL, 1, 0, &node) == &EG(error_zval)) { return NULL; } type = SXE_ITER_NONE; @@ -711,7 +716,7 @@ static zval *sxe_property_get_adr(zval *object, zval *member, int fetch_type, vo /* {{{ sxe_prop_dim_exists() */ -static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) +static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -729,7 +734,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend member = &tmp_zv; } - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); @@ -817,15 +822,17 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend /* {{{ sxe_property_exists() */ -static int sxe_property_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int sxe_property_exists(zend_object *object, zend_string *name, int check_empty, void **cache_slot) { - return sxe_prop_dim_exists(object, member, check_empty, 1, 0); + zval member; + ZVAL_STR(&member, name); + return sxe_prop_dim_exists(object, &member, check_empty, 1, 0); } /* }}} */ /* {{{ sxe_dimension_exists() */ -static int sxe_dimension_exists(zval *object, zval *member, int check_empty) +static int sxe_dimension_exists(zend_object *object, zval *member, int check_empty) { return sxe_prop_dim_exists(object, member, check_empty, 0, 1); } @@ -833,7 +840,7 @@ static int sxe_dimension_exists(zval *object, zval *member, int check_empty) /* {{{ sxe_prop_dim_delete() */ -static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, zend_bool attribs) +static void sxe_prop_dim_delete(zend_object *object, zval *member, zend_bool elements, zend_bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -852,7 +859,7 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, member = &tmp_zv; } - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); @@ -944,15 +951,17 @@ next_iter: /* {{{ sxe_property_delete() */ -static void sxe_property_delete(zval *object, zval *member, void **cache_slot) +static void sxe_property_delete(zend_object *object, zend_string *name, void **cache_slot) { - sxe_prop_dim_delete(object, member, 1, 0); + zval member; + ZVAL_STR(&member, name); + sxe_prop_dim_delete(object, &member, 1, 0); } /* }}} */ /* {{{ sxe_dimension_unset() */ -static void sxe_dimension_delete(zval *object, zval *offset) +static void sxe_dimension_delete(zend_object *object, zval *offset) { sxe_prop_dim_delete(object, offset, 0, 1); } @@ -1026,7 +1035,7 @@ static void sxe_properties_add(HashTable *rv, char *name, int namelen, zval *val } /* }}} */ -static int sxe_prop_is_empty(zval *object) /* {{{ */ +static int sxe_prop_is_empty(zend_object *object) /* {{{ */ { php_sxe_object *sxe; xmlNodePtr node; @@ -1036,7 +1045,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ int is_empty; int use_iter = 0; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); if (!node) { @@ -1119,7 +1128,7 @@ next_iter: } /* }}} */ -static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */ +static HashTable *sxe_get_prop_hash(zend_object *object, int is_debug) /* {{{ */ { zval value; zval zattr; @@ -1135,7 +1144,7 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */ use_iter = 0; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (is_debug) { rv = zend_new_array(0); @@ -1249,9 +1258,9 @@ next_iter: } /* }}} */ -static HashTable *sxe_get_gc(zval *object, zval **table, int *n) /* {{{ */ { +static HashTable *sxe_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { php_sxe_object *sxe; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); *table = NULL; *n = 0; @@ -1259,13 +1268,13 @@ static HashTable *sxe_get_gc(zval *object, zval **table, int *n) /* {{{ */ { } /* }}} */ -static HashTable *sxe_get_properties(zval *object) /* {{{ */ +static HashTable *sxe_get_properties(zend_object *object) /* {{{ */ { return sxe_get_prop_hash(object, 0); } /* }}} */ -static HashTable * sxe_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable * sxe_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { *is_temp = 1; return sxe_get_prop_hash(object, 1); @@ -1403,7 +1412,7 @@ SXE_METHOD(registerXPathNamespace) } if (xmlXPathRegisterNs(sxe->xpath, (xmlChar *)prefix, (xmlChar *)ns_uri) != 0) { - RETURN_FALSE + RETURN_FALSE; } RETURN_TRUE; } @@ -1419,88 +1428,76 @@ SXE_METHOD(asXML) xmlOutputBufferPtr outbuf; xmlChar *strval; int strval_len; - char *filename; + char *filename = NULL; size_t filename_len; - if (ZEND_NUM_ARGS() > 1) { - RETURN_FALSE; - } - - if (ZEND_NUM_ARGS() == 1) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) { - RETURN_FALSE; - } - - sxe = Z_SXEOBJ_P(ZEND_THIS); - GET_NODE(sxe, node); - node = php_sxe_get_first_node(sxe, node); - - if (node) { - if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { - int bytes; - bytes = xmlSaveFile(filename, (xmlDocPtr) sxe->document->ptr); - if (bytes == -1) { - RETURN_FALSE; - } else { - RETURN_TRUE; - } - } else { - outbuf = xmlOutputBufferCreateFilename(filename, NULL, 0); - - if (outbuf == NULL) { - RETURN_FALSE; - } - - xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); - xmlOutputBufferClose(outbuf); - RETURN_TRUE; - } - } else { - RETURN_FALSE; - } + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|p", &filename, &filename_len) == FAILURE) { + return; } sxe = Z_SXEOBJ_P(ZEND_THIS); GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node); - if (node) { + if (!node) { + RETURN_FALSE; + } + + if (filename) { if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { - xmlDocDumpMemoryEnc((xmlDocPtr) sxe->document->ptr, &strval, &strval_len, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); - if (!strval) { - RETVAL_FALSE; + int bytes; + bytes = xmlSaveFile(filename, (xmlDocPtr) sxe->document->ptr); + if (bytes == -1) { + RETURN_FALSE; } else { - RETVAL_STRINGL((char *)strval, strval_len); + RETURN_TRUE; } - xmlFree(strval); } else { - char *return_content; - size_t return_len; - /* Should we be passing encoding information instead of NULL? */ - outbuf = xmlAllocOutputBuffer(NULL); + outbuf = xmlOutputBufferCreateFilename(filename, NULL, 0); if (outbuf == NULL) { RETURN_FALSE; } - xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); - xmlOutputBufferFlush(outbuf); + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); + xmlOutputBufferClose(outbuf); + RETURN_TRUE; + } + } + + if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { + xmlDocDumpMemoryEnc((xmlDocPtr) sxe->document->ptr, &strval, &strval_len, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); + if (!strval) { + RETVAL_FALSE; + } else { + RETVAL_STRINGL((char *)strval, strval_len); + } + xmlFree(strval); + } else { + char *return_content; + size_t return_len; + /* Should we be passing encoding information instead of NULL? */ + outbuf = xmlAllocOutputBuffer(NULL); + + if (outbuf == NULL) { + RETURN_FALSE; + } + + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); + xmlOutputBufferFlush(outbuf); #ifdef LIBXML2_NEW_BUFFER - return_content = (char *)xmlOutputBufferGetContent(outbuf); - return_len = xmlOutputBufferGetSize(outbuf); + return_content = (char *)xmlOutputBufferGetContent(outbuf); + return_len = xmlOutputBufferGetSize(outbuf); #else - return_content = (char *)outbuf->buffer->content; - return_len = outbuf->buffer->use; + return_content = (char *)outbuf->buffer->content; + return_len = outbuf->buffer->use; #endif - if (!return_content) { - RETVAL_FALSE; - } else { - RETVAL_STRINGL(return_content, return_len); - } - xmlOutputBufferClose(outbuf); + if (!return_content) { + RETVAL_FALSE; + } else { + RETVAL_STRINGL(return_content, return_len); } - } else { - RETVAL_FALSE; + xmlOutputBufferClose(outbuf); } } /* }}} */ @@ -1661,6 +1658,10 @@ SXE_METHOD(getName) xmlNodePtr node; int namelen; + if (zend_parse_parameters_none() == FAILURE) { + return; + } + sxe = Z_SXEOBJ_P(ZEND_THIS); GET_NODE(sxe, node); @@ -1875,14 +1876,14 @@ static int cast_object(zval *object, int type, char *contents) /* {{{ sxe_object_cast() */ -static int sxe_object_cast_ex(zval *readobj, zval *writeobj, int type) +static int sxe_object_cast_ex(zend_object *readobj, zval *writeobj, int type) { php_sxe_object *sxe; xmlChar *contents = NULL; xmlNodePtr node; int rv; - sxe = Z_SXEOBJ_P(readobj); + sxe = php_sxe_fetch_object(readobj); if (type == _IS_BOOL) { node = php_sxe_get_first_node(sxe, NULL); @@ -1924,7 +1925,7 @@ static int sxe_object_cast_ex(zval *readobj, zval *writeobj, int type) /* }}} */ /* {{{ Variant of sxe_object_cast_ex that handles overwritten __toString() method */ -static int sxe_object_cast(zval *readobj, zval *writeobj, int type) +static int sxe_object_cast(zend_object *readobj, zval *writeobj, int type) { if (type == IS_STRING && zend_std_cast_object_tostring(readobj, writeobj, IS_STRING) == SUCCESS @@ -1940,7 +1941,11 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type) Returns the string content */ SXE_METHOD(__toString) { - if (sxe_object_cast_ex(ZEND_THIS, return_value, IS_STRING) != SUCCESS) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + if (sxe_object_cast_ex(Z_OBJ_P(ZEND_THIS), return_value, IS_STRING) != SUCCESS) { zval_ptr_dtor(return_value); RETURN_EMPTY_STRING(); } @@ -1974,10 +1979,10 @@ static int php_sxe_count_elements_helper(php_sxe_object *sxe, zend_long *count) } /* }}} */ -static int sxe_count_elements(zval *object, zend_long *count) /* {{{ */ +static int sxe_count_elements(zend_object *object, zend_long *count) /* {{{ */ { php_sxe_object *intern; - intern = Z_SXEOBJ_P(object); + intern = php_sxe_fetch_object(object); if (intern->fptr_count) { zval rv; zend_call_method_with_0_params(object, intern->zo.ce, &intern->fptr_count, "count", &rv); @@ -2009,25 +2014,14 @@ SXE_METHOD(count) } /* }}} */ -static zval *sxe_get_value(zval *z, zval *rv) /* {{{ */ -{ - if (sxe_object_cast_ex(z, rv, IS_STRING) == FAILURE) { - zend_error(E_ERROR, "Unable to cast node to string"); - /* FIXME: Should not be fatal */ - } - - return rv; -} -/* }}} */ - static zend_object_handlers sxe_object_handlers; /* {{{ sxe_object_clone() */ static zend_object * -sxe_object_clone(zval *object) +sxe_object_clone(zend_object *object) { - php_sxe_object *sxe = Z_SXEOBJ_P(object); + php_sxe_object *sxe = php_sxe_fetch_object(object); php_sxe_object *clone; xmlNodePtr nodep = NULL; xmlDocPtr docp = NULL; @@ -2572,73 +2566,6 @@ PHP_FUNCTION(simplexml_import_dom) } /* }}} */ -/* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexml_load_file, 0, 0, 1) - ZEND_ARG_INFO(0, filename) - ZEND_ARG_INFO(0, class_name) - ZEND_ARG_INFO(0, options) - ZEND_ARG_INFO(0, ns) - ZEND_ARG_INFO(0, is_prefix) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexml_load_string, 0, 0, 1) - ZEND_ARG_INFO(0, data) - ZEND_ARG_INFO(0, class_name) - ZEND_ARG_INFO(0, options) - ZEND_ARG_INFO(0, ns) - ZEND_ARG_INFO(0, is_prefix) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexml_import_dom, 0, 0, 1) - ZEND_ARG_INFO(0, node) - ZEND_ARG_INFO(0, class_name) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_xpath, 0, 0, 1) - ZEND_ARG_INFO(0, path) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_registerxpathnamespace, 0, 0, 2) - ZEND_ARG_INFO(0, prefix) - ZEND_ARG_INFO(0, ns) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_asxml, 0, 0, 0) - ZEND_ARG_INFO(0, filename) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_getnamespaces, 0, 0, 0) - ZEND_ARG_INFO(0, recursve) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_getdocnamespaces, 0, 0, 0) - ZEND_ARG_INFO(0, recursve) - ZEND_ARG_INFO(0, from_root) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_children, 0, 0, 0) - ZEND_ARG_INFO(0, ns) - ZEND_ARG_INFO(0, is_prefix) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement__construct, 0, 0, 1) - ZEND_ARG_INFO(0, data) - ZEND_ARG_INFO(0, options) - ZEND_ARG_INFO(0, data_is_url) - ZEND_ARG_INFO(0, ns) - ZEND_ARG_INFO(0, is_prefix) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_simplexmlelement__void, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_addchild, 0, 0, 1) - ZEND_ARG_INFO(0, name) - ZEND_ARG_INFO(0, value) - ZEND_ARG_INFO(0, ns) -ZEND_END_ARG_INFO() -/* }}} */ - static const zend_function_entry simplexml_functions[] = { /* {{{ */ PHP_FE(simplexml_load_file, arginfo_simplexml_load_file) PHP_FE(simplexml_load_string, arginfo_simplexml_load_string) @@ -2676,20 +2603,20 @@ ZEND_GET_MODULE(simplexml) /* the method table */ /* each method can have its own parameters and visibility */ static const zend_function_entry sxe_functions[] = { /* {{{ */ - SXE_ME(__construct, arginfo_simplexmlelement__construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) /* must be called */ - SXE_ME(asXML, arginfo_simplexmlelement_asxml, ZEND_ACC_PUBLIC) - SXE_MALIAS(saveXML, asXML, arginfo_simplexmlelement_asxml, ZEND_ACC_PUBLIC) - SXE_ME(xpath, arginfo_simplexmlelement_xpath, ZEND_ACC_PUBLIC) - SXE_ME(registerXPathNamespace, arginfo_simplexmlelement_registerxpathnamespace, ZEND_ACC_PUBLIC) - SXE_ME(attributes, arginfo_simplexmlelement_children, ZEND_ACC_PUBLIC) - SXE_ME(children, arginfo_simplexmlelement_children, ZEND_ACC_PUBLIC) - SXE_ME(getNamespaces, arginfo_simplexmlelement_getnamespaces, ZEND_ACC_PUBLIC) - SXE_ME(getDocNamespaces, arginfo_simplexmlelement_getdocnamespaces, ZEND_ACC_PUBLIC) - SXE_ME(getName, arginfo_simplexmlelement__void, ZEND_ACC_PUBLIC) - SXE_ME(addChild, arginfo_simplexmlelement_addchild, ZEND_ACC_PUBLIC) - SXE_ME(addAttribute, arginfo_simplexmlelement_addchild, ZEND_ACC_PUBLIC) - SXE_ME(__toString, arginfo_simplexmlelement__void, ZEND_ACC_PUBLIC) - SXE_ME(count, arginfo_simplexmlelement__void, ZEND_ACC_PUBLIC) + SXE_ME(__construct, arginfo_class_SimpleXMLElement___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) /* must be called */ + SXE_ME(asXML, arginfo_class_SimpleXMLElement_asXML, ZEND_ACC_PUBLIC) + SXE_MALIAS(saveXML, asXML, arginfo_class_SimpleXMLElement_saveXML, ZEND_ACC_PUBLIC) + SXE_ME(xpath, arginfo_class_SimpleXMLElement_xpath, ZEND_ACC_PUBLIC) + SXE_ME(registerXPathNamespace, arginfo_class_SimpleXMLElement_registerXPathNamespace, ZEND_ACC_PUBLIC) + SXE_ME(attributes, arginfo_class_SimpleXMLElement_attributes, ZEND_ACC_PUBLIC) + SXE_ME(children, arginfo_class_SimpleXMLElement_children, ZEND_ACC_PUBLIC) + SXE_ME(getNamespaces, arginfo_class_SimpleXMLElement_getNamespaces, ZEND_ACC_PUBLIC) + SXE_ME(getDocNamespaces, arginfo_class_SimpleXMLElement_getDocNamespaces, ZEND_ACC_PUBLIC) + SXE_ME(getName, arginfo_class_SimpleXMLElement_getName, ZEND_ACC_PUBLIC) + SXE_ME(addChild, arginfo_class_SimpleXMLElement_addChild, ZEND_ACC_PUBLIC) + SXE_ME(addAttribute, arginfo_class_SimpleXMLElement_addAttribute, ZEND_ACC_PUBLIC) + SXE_ME(__toString, arginfo_class_SimpleXMLElement___toString, ZEND_ACC_PUBLIC) + SXE_ME(count, arginfo_class_SimpleXMLElement_count, ZEND_ACC_PUBLIC) PHP_FE_END }; /* }}} */ @@ -2716,7 +2643,6 @@ PHP_MINIT_FUNCTION(simplexml) sxe_object_handlers.read_dimension = sxe_dimension_read; sxe_object_handlers.write_dimension = sxe_dimension_write; sxe_object_handlers.get_property_ptr_ptr = sxe_property_get_adr; - sxe_object_handlers.get = sxe_get_value; sxe_object_handlers.has_property = sxe_property_exists; sxe_object_handlers.unset_property = sxe_property_delete; sxe_object_handlers.has_dimension = sxe_dimension_exists; |
