From: Uwe Steinmann Date: Thu, 17 Feb 2000 15:05:24 +0000 (+0000) Subject: - change some function name into php style X-Git-Tag: BEFORE_SAPI_POST_PATCH_17_FEB_2000~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=995c565fba10a4abaddd4db556c89b98bdd5fd41;p=php - change some function name into php style --- diff --git a/ext/domxml/domxml.c b/ext/domxml/domxml.c index 9f8fd295e9..6fc14137bf 100644 --- a/ext/domxml/domxml.c +++ b/ext/domxml/domxml.c @@ -38,23 +38,23 @@ static zend_function_entry php_domxml_functions[] = { PHP_FE(xmldocfile, NULL) PHP_FE(xmltree, NULL) PHP_FE(domxml_root, NULL) - PHP_FE(domxml_addroot, NULL) + PHP_FE(domxml_add_root, NULL) PHP_FE(domxml_dumpmem, NULL) PHP_FE(domxml_attributes, NULL) PHP_FE(domxml_getattr, NULL) PHP_FE(domxml_setattr, NULL) PHP_FE(domxml_children, NULL) - PHP_FE(domxml_newchild, NULL) + PHP_FE(domxml_new_child, NULL) PHP_FE(domxml_node, NULL) - PHP_FE(domxml_newxmldoc, NULL) - PHP_FALIAS(newxmldoc, domxml_newxmldoc, NULL) + PHP_FE(domxml_new_xmldoc, NULL) + PHP_FALIAS(new_xmldoc, domxml_new_xmldoc, NULL) {NULL, NULL, NULL} }; static zend_function_entry php_domxmldoc_class_functions[] = { PHP_FALIAS(root, domxml_root, NULL) - PHP_FALIAS(addroot, domxml_addroot, NULL) + PHP_FALIAS(add_root, domxml_add_root, NULL) PHP_FALIAS(dtd, domxml_intdtd, NULL) PHP_FALIAS(dumpmem, domxml_dumpmem, NULL) {NULL, NULL, NULL} @@ -72,7 +72,7 @@ static zend_function_entry php_domxmlnode_class_functions[] = { PHP_FALIAS(lastchild, domxml_lastchild, NULL) PHP_FALIAS(children, domxml_children, NULL) PHP_FALIAS(parent, domxml_parent, NULL) - PHP_FALIAS(newchild, domxml_newchild, NULL) + PHP_FALIAS(new_child, domxml_new_child, NULL) PHP_FALIAS(getattr, domxml_getattr, NULL) PHP_FALIAS(setattr, domxml_setattr, NULL) PHP_FALIAS(attributes, domxml_attributes, NULL) @@ -738,9 +738,9 @@ PHP_FUNCTION(xmldocfile) } /* }}} */ -/* {{{ proto string domxml_newchild([int node_handle], string name, string content) +/* {{{ proto string domxml_new_child([int node_handle], string name, string content) Adds child node to parent node */ -PHP_FUNCTION(domxml_newchild) +PHP_FUNCTION(domxml_new_child) { zval *id, *name, *content, **tmp; int id_to_find; @@ -796,9 +796,9 @@ PHP_FUNCTION(domxml_newchild) } /* }}} */ -/* {{{ proto string domxml_addroot([int doc_handle], string name) +/* {{{ proto string domxml_add_root([int doc_handle], string name) Adds root node to document */ -PHP_FUNCTION(domxml_addroot) +PHP_FUNCTION(domxml_add_root) { zval *id, *name, **tmp; int id_to_find; @@ -852,9 +852,9 @@ PHP_FUNCTION(domxml_addroot) } /* }}} */ -/* {{{ proto class domxml_newxmldoc(string version) +/* {{{ proto class domxml_new_xmldoc(string version) Creates new xmldoc */ -PHP_FUNCTION(domxml_newxmldoc) +PHP_FUNCTION(domxml_new_xmldoc) { zval *arg; xmlDoc *docp; diff --git a/ext/domxml/php_domxml.h b/ext/domxml/php_domxml.h index a479d3f410..dc906b79e9 100644 --- a/ext/domxml/php_domxml.h +++ b/ext/domxml/php_domxml.h @@ -46,11 +46,11 @@ extern PHP_MINFO_FUNCTION(domxml); PHP_FUNCTION(xmldoc); PHP_FUNCTION(xmldocfile); PHP_FUNCTION(xmltree); -PHP_FUNCTION(domxml_newxmldoc); +PHP_FUNCTION(domxml_new_xmldoc); /* Class Document methods */ PHP_FUNCTION(domxml_root); -PHP_FUNCTION(domxml_addroot); +PHP_FUNCTION(domxml_add_root); PHP_FUNCTION(domxml_intdtd); PHP_FUNCTION(domxml_dumpmem); @@ -62,7 +62,7 @@ PHP_FUNCTION(domxml_children); PHP_FUNCTION(domxml_lastchild); PHP_FUNCTION(domxml_parent); PHP_FUNCTION(domxml_node); -PHP_FUNCTION(domxml_newchild); +PHP_FUNCTION(domxml_new_child); /* Class Attribute methods */ PHP_FUNCTION(domxml_attrname); diff --git a/tests/testdom b/tests/testdom index e8e01a94bd..4593fe05da 100644 --- a/tests/testdom +++ b/tests/testdom @@ -69,14 +69,14 @@ echo "\n"; /* The following builds a xml document from scratch */ echo "Test 3: building a xml document from scratch\n"; -$doc = newxmldoc("1.0"); -$root = $doc->addroot("HTML"); -$head = $root->newchild("HEAD", ""); -$head->newchild("TITLE", "Hier der Titel"); -$body = $root->newchild("BODY", ""); -$table = $body->newchild("TABLE", ""); +$doc = new_xmldoc("1.0"); +$root = $doc->add_root("HTML"); +$head = $root->new_child("HEAD", ""); +$head->new_child("TITLE", "Hier der Titel"); +$body = $root->new_child("BODY", ""); +$table = $body->new_child("TABLE", ""); $table->setattr("WIDTH", "100%"); -$table->newchild("TR", " "); +$table->new_child("TR", " "); echo $doc->dumpmem(); ?>