cvs: php4 /ext/domxml php_domxml.c php_domxml.h

From: Date: Mon, 21 Jan 2002 23:21:32 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c php_domxml.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9125@lists.php.net to get a copy of this message
jarkol Mon Jan 21 18:21:32 2002 EDT Modified files: /php4/ext/domxml php_domxml.c php_domxml.h Log: Added domxml_substitute_entities_default() function Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.110 php4/ext/domxml/php_domxml.c:1.111 --- php4/ext/domxml/php_domxml.c:1.110 Mon Jan 21 14:12:00 2002 +++ php4/ext/domxml/php_domxml.c Mon Jan 21 18:21:31 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.110 2002/01/21 19:12:00 zenderx Exp $ */ +/* $Id: php_domxml.c,v 1.111 2002/01/21 23:21:31 jarkol Exp $ */ /* TODO * - Support Notation Nodes @@ -188,6 +188,7 @@ PHP_FE(html_doc_file, NULL) #endif PHP_FE(xmltree, NULL) + PHP_FE(domxml_substitute_entities_default, NULL) PHP_FE(domxml_add_root, NULL) PHP_FE(domxml_dump_mem, NULL) PHP_FE(domxml_dump_mem_file, NULL) @@ -2839,6 +2840,28 @@ } /* }}} */ #endif /* defined(LIBXML_HTML_ENABLED) */ + +/* {{{ proto bool domxml_substitute_entities_default(bool enable) + Set and return the previous value for default entity support */ +PHP_FUNCTION(domxml_substitute_entities_default) +{ + zend_bool enable; + int old_val, new_val; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &enable) == FAILURE) { + return; + } + + new_val = (enable) ? 1 : 0; + old_val = xmlSubstituteEntitiesDefault(new_val); + + if (old_val) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} +/* }}} */ /* {{{ proto bool domxml_node_text_concat(string content) Add string tocontent of a node */ Index: php4/ext/domxml/php_domxml.h diff -u php4/ext/domxml/php_domxml.h:1.40 php4/ext/domxml/php_domxml.h:1.41 --- php4/ext/domxml/php_domxml.h:1.40 Fri Jan 18 07:40:12 2002 +++ php4/ext/domxml/php_domxml.h Mon Jan 21 18:21:32 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.h,v 1.40 2002/01/18 12:40:12 chregu Exp $ */ +/* $Id: php_domxml.h,v 1.41 2002/01/21 23:21:32 jarkol Exp $ */ #ifndef PHP_DOMXML_H #define PHP_DOMXML_H @@ -63,6 +63,7 @@ #endif PHP_FUNCTION(xmltree); PHP_FUNCTION(domxml_new_xmldoc); +PHP_FUNCTION(domxml_substitute_entities_default); /* Class Document methods */ PHP_FUNCTION(domxml_doc_doctype);

« previous php.cvs (#9125) next »