diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
commit | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch) | |
tree | 6460876d356113fa7053df36f2aa00baa7db24a9 /ext/dom/php_dom.c | |
parent | 855a09f4eded707941180c9d90acd17c25e29447 (diff) | |
download | php-01fcdff3849c3691d9aaeaab735846ab6d8895ca.tar.gz |
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r-- | ext/dom/php_dom.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 73c711046..da73a7f63 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_dom.c 298967 2010-05-04 12:55:26Z rrichards $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -29,6 +29,7 @@ #include "ext/standard/php_rand.h" #include "php_dom.h" #include "dom_properties.h" +#include "zend_interfaces.h" #include "ext/standard/info.h" #define PHP_XPATH 1 @@ -680,6 +681,7 @@ PHP_MINIT_FUNCTION(dom) ce.create_object = dom_nnodemap_objects_new; dom_nodelist_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); dom_nodelist_class_entry->get_iterator = php_dom_get_iterator; + zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, zend_ce_traversable); zend_hash_init(&dom_nodelist_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_nodelist_prop_handlers, "length", dom_nodelist_length_read, NULL TSRMLS_CC); @@ -689,6 +691,7 @@ PHP_MINIT_FUNCTION(dom) ce.create_object = dom_nnodemap_objects_new; dom_namednodemap_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); dom_namednodemap_class_entry->get_iterator = php_dom_get_iterator; + zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, zend_ce_traversable); zend_hash_init(&dom_namednodemap_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_namednodemap_prop_handlers, "length", dom_namednodemap_length_read, NULL TSRMLS_CC); @@ -777,15 +780,12 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_documenttype_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_documenttype_prop_handlers, sizeof(dom_documenttype_prop_handlers), NULL); - REGISTER_DOM_CLASS(ce, "DOMNotation", NULL, php_dom_notation_class_functions, dom_notation_class_entry); + REGISTER_DOM_CLASS(ce, "DOMNotation", dom_node_class_entry, php_dom_notation_class_functions, dom_notation_class_entry); zend_hash_init(&dom_notation_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_notation_prop_handlers, "publicId", dom_notation_public_id_read, NULL TSRMLS_CC); dom_register_prop_handler(&dom_notation_prop_handlers, "systemId", dom_notation_system_id_read, NULL TSRMLS_CC); - /* Notation nodes are special */ - dom_register_prop_handler(&dom_notation_prop_handlers, "nodeName", dom_node_node_name_read, NULL TSRMLS_CC); - dom_register_prop_handler(&dom_notation_prop_handlers, "nodeValue", dom_node_node_value_read, dom_node_node_value_write TSRMLS_CC); - dom_register_prop_handler(&dom_notation_prop_handlers, "attributes", dom_node_attributes_read, NULL TSRMLS_CC); + zend_hash_merge(&dom_notation_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_notation_prop_handlers, sizeof(dom_notation_prop_handlers), NULL); REGISTER_DOM_CLASS(ce, "DOMEntity", dom_node_class_entry, php_dom_entity_class_functions, dom_entity_class_entry); |