use new style constructors

fix return for nodelist item
This commit is contained in:
Rob Richards 2004-03-31 17:18:59 +00:00
parent 39a43c994e
commit 010c340f29
12 changed files with 50 additions and 49 deletions

View file

@ -39,12 +39,12 @@
zend_function_entry php_dom_attr_class_functions[] = {
PHP_FALIAS(isId, dom_attr_is_id, NULL)
PHP_FALIAS(domattr, dom_attr_attr, NULL)
PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domnode dom_attr_attr(string name, [string value]); */
PHP_FUNCTION(dom_attr_attr)
/* {{{ proto void DomAttr::__construct(string name, [string value]); */
PHP_METHOD(domattr, __construct)
{
zval *id;
@ -79,7 +79,7 @@ PHP_FUNCTION(dom_attr_attr)
}
}
/* }}} end dom_attr_attr */
/* }}} end DomAttr::__construct */
/* {{{ proto name string

View file

@ -36,12 +36,12 @@
*/
zend_function_entry php_dom_cdatasection_class_functions[] = {
PHP_FALIAS("domcdatasection", dom_cdatasection_cdatasection, NULL)
PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domnode dom_cdatasection_cdatasection(string value); */
PHP_FUNCTION(dom_cdatasection_cdatasection)
/* {{{ proto void DomCDataSection::__construct(string value); */
PHP_METHOD(domcdatasection, __construct)
{
zval *id;
@ -68,6 +68,6 @@ PHP_FUNCTION(dom_cdatasection_cdatasection)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_cdatasection_cdatasection */
/* }}} end DomCDataSection::__construct */
#endif

View file

@ -36,12 +36,12 @@
*/
zend_function_entry php_dom_comment_class_functions[] = {
PHP_FALIAS(domcomment, dom_comment_comment, NULL)
PHP_ME(domcomment, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto dom_comment_comment([string value]); */
PHP_FUNCTION(dom_comment_comment)
/* {{{ proto void DomComment::__construct([string value]); */
PHP_METHOD(domcomment, __construct)
{
zval *id;
@ -68,5 +68,5 @@ PHP_FUNCTION(dom_comment_comment)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_comment_comment */
/* }}} end DomComment::__construct */
#endif

View file

@ -70,7 +70,7 @@ zend_function_entry php_dom_document_class_functions[] = {
PHP_FALIAS(save, dom_document_save, NULL)
PHP_ME(domdocument, loadXML, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
PHP_FALIAS(saveXML, dom_document_savexml, NULL)
PHP_FALIAS(domdocument, dom_document_document, NULL)
PHP_ME(domdocument, __construct, NULL, ZEND_ACC_PUBLIC)
PHP_FALIAS(validate, dom_document_validate, NULL)
PHP_FALIAS(xinclude, dom_document_xinclude, NULL)
#if defined(LIBXML_HTML_ENABLED)
@ -1286,8 +1286,8 @@ PHP_FUNCTION(dom_document_rename_node)
}
/* }}} end dom_document_rename_node */
/* {{{ proto domnode dom_document_document([string version], [string encoding]); */
PHP_FUNCTION(dom_document_document)
/* {{{ proto void DomDocument::__construct([string version], [string encoding]); */
PHP_METHOD(domdocument, __construct)
{
zval *id;

View file

@ -36,12 +36,12 @@
*/
zend_function_entry php_dom_documentfragment_class_functions[] = {
PHP_FALIAS(domdocumentfragment, dom_documentfragment_documentfragment, NULL)
PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto dom_documentfragment_documentfragment(); */
PHP_FUNCTION(dom_documentfragment_documentfragment)
/* {{{ proto void DomDocumentFragment::__construct(); */
PHP_METHOD(domdocumentfragment, __construct)
{
zval *id;
@ -67,5 +67,5 @@ PHP_FUNCTION(dom_documentfragment_documentfragment)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_documentfragment_documentfragment */
/* }}} end DomDocumentFragment::__construct */
#endif

View file

@ -99,7 +99,7 @@ PHP_METHOD(domimplementation, createDocument);
PHP_METHOD(domimplementation, getFeature);
/* domdocumentfragment methods */
PHP_FUNCTION(dom_documentfragment_documentfragment);
PHP_METHOD(domdocumentfragment, __construct);
/* domdocument methods */
PHP_FUNCTION(dom_document_create_element);
@ -119,7 +119,7 @@ PHP_FUNCTION(dom_document_get_element_by_id);
PHP_FUNCTION(dom_document_adopt_node);
PHP_FUNCTION(dom_document_normalize_document);
PHP_FUNCTION(dom_document_rename_node);
PHP_FUNCTION(dom_document_document);
PHP_METHOD(domdocument, __construct);
/* convienience methods */
PHP_METHOD(domdocument, load);
PHP_FUNCTION(dom_document_save);
@ -183,7 +183,7 @@ PHP_FUNCTION(dom_characterdata_replace_data);
/* domattr methods */
PHP_FUNCTION(dom_attr_is_id);
PHP_FUNCTION(dom_attr_attr);
PHP_METHOD(domattr, __construct);
/* domelement methods */
PHP_FUNCTION(dom_element_get_attribute);
@ -204,16 +204,16 @@ PHP_FUNCTION(dom_element_has_attribute_ns);
PHP_FUNCTION(dom_element_set_id_attribute);
PHP_FUNCTION(dom_element_set_id_attribute_ns);
PHP_FUNCTION(dom_element_set_id_attribute_node);
PHP_FUNCTION(dom_element_element);
PHP_METHOD(domelement, __construct);
/* domtext methods */
PHP_FUNCTION(dom_text_split_text);
PHP_FUNCTION(dom_text_is_whitespace_in_element_content);
PHP_FUNCTION(dom_text_replace_whole_text);
PHP_FUNCTION(dom_text_text);
PHP_METHOD(domtext, __construct);
/* domcomment methods */
PHP_FUNCTION(dom_comment_comment);
PHP_METHOD(domcomment, __construct);
/* domtypeinfo methods */
@ -233,7 +233,7 @@ PHP_FUNCTION(dom_domconfiguration_get_parameter);
PHP_FUNCTION(dom_domconfiguration_can_set_parameter);
/* domcdatasection methods */
PHP_FUNCTION(dom_cdatasection_cdatasection);
PHP_METHOD(domcdatasection, __construct);
/* domdocumenttype methods */
@ -242,10 +242,10 @@ PHP_FUNCTION(dom_cdatasection_cdatasection);
/* domentity methods */
/* domentityreference methods */
PHP_FUNCTION(dom_entityreference_entityreference);
PHP_METHOD(domentityreference, __construct);
/* domprocessinginstruction methods */
PHP_FUNCTION(dom_processinginstruction_processinginstruction);
PHP_METHOD(domprocessinginstruction, __construct);
/* string_extend methods */
PHP_FUNCTION(dom_string_extend_find_offset16);
@ -253,7 +253,7 @@ PHP_FUNCTION(dom_string_extend_find_offset32);
#if defined(LIBXML_XPATH_ENABLED)
/* xpath methods */
PHP_FUNCTION(dom_xpath_xpath);
PHP_METHOD(domxpath, __construct);
PHP_FUNCTION(dom_xpath_register_ns);
PHP_FUNCTION(dom_xpath_query);
#endif

View file

@ -54,12 +54,12 @@ zend_function_entry php_dom_element_class_functions[] = {
PHP_FALIAS(setIdAttribute, dom_element_set_id_attribute, NULL)
PHP_FALIAS(setIdAttributeNS, dom_element_set_id_attribute_ns, NULL)
PHP_FALIAS(setIdAttributeNode, dom_element_set_id_attribute_node, NULL)
PHP_FALIAS(domelement, dom_element_element, NULL)
PHP_ME(domelement, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domnode dom_element_element(string name, [string value]); */
PHP_FUNCTION(dom_element_element)
/* {{{ proto void DomElement::__construct(string name, [string value]); */
PHP_METHOD(domelement, __construct)
{
zval *id;
@ -121,7 +121,7 @@ PHP_FUNCTION(dom_element_element)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_element_element */
/* }}} end DomElement::__construct */
/* {{{ proto tagName string
readonly=yes

View file

@ -36,12 +36,12 @@
*/
zend_function_entry php_dom_entityreference_class_functions[] = {
PHP_FALIAS(domentityreference, dom_entityreference_entityreference, NULL)
PHP_ME(domentityreference, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domnode dom_entityreference_entityreference(string name); */
PHP_FUNCTION(dom_entityreference_entityreference)
/* {{{ proto void DomEntityReference::__construct(string name); */
PHP_METHOD(domentityreference, __construct)
{
zval *id;
xmlNode *node;
@ -74,5 +74,5 @@ PHP_FUNCTION(dom_entityreference_entityreference)
}
}
/* }}} end dom_entityreference_entityreference */
/* }}} end DomEntityReference::__construct */
#endif

View file

@ -160,6 +160,7 @@ PHP_FUNCTION(dom_nodelist_item)
if (itemnode) {
DOM_RET_OBJ(rv, itemnode, &ret, objmap->baseobj);
return;
}
}

View file

@ -36,12 +36,12 @@
*/
zend_function_entry php_dom_processinginstruction_class_functions[] = {
PHP_FALIAS("domprocessinginstruction", dom_processinginstruction_processinginstruction, NULL)
PHP_ME(domprocessinginstruction, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domnode dom_processinginstruction_processinginstruction(string name, [string value]); */
PHP_FUNCTION(dom_processinginstruction_processinginstruction)
/* {{{ proto void DomProcessingInstruction::__construct(string name, [string value]); */
PHP_METHOD(domprocessinginstruction, __construct)
{
zval *id;
@ -73,7 +73,7 @@ PHP_FUNCTION(dom_processinginstruction_processinginstruction)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_processinginstruction_processinginstruction */
/* }}} end DomProcessingInstruction::__construct */
/* {{{ proto target string
readonly=yes

View file

@ -39,12 +39,12 @@ zend_function_entry php_dom_text_class_functions[] = {
PHP_FALIAS(splitText, dom_text_split_text, NULL)
PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, NULL)
PHP_FALIAS(replaceWholeText, dom_text_replace_whole_text, NULL)
PHP_FALIAS(domtext, dom_text_text, NULL)
PHP_ME(domtext, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* {{{ proto domtext_text([string value]); */
PHP_FUNCTION(dom_text_text)
/* {{{ proto void DomText::__construct([string value]); */
PHP_METHOD(domtext, __construct)
{
zval *id;
@ -71,7 +71,7 @@ PHP_FUNCTION(dom_text_text)
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern TSRMLS_CC);
}
}
/* }}} end dom_text_text */
/* }}} end DomText::__construct */
/* {{{ proto wholeText string
readonly=yes

View file

@ -35,14 +35,14 @@
#if defined(LIBXML_XPATH_ENABLED)
zend_function_entry php_dom_xpath_class_functions[] = {
PHP_FALIAS(domxpath, dom_xpath_xpath, NULL)
PHP_ME(domxpath, __construct, NULL, ZEND_ACC_PUBLIC)
PHP_FALIAS(register_namespace, dom_xpath_register_ns, NULL)
PHP_FALIAS(query, dom_xpath_query, NULL)
{NULL, NULL, NULL}
};
/* {{{ proto domxpath dom_xpath_xpath(domDocument doc); */
PHP_FUNCTION(dom_xpath_xpath)
/* {{{ proto void DomXPath::__construct(domDocument doc); */
PHP_METHOD(domxpath, __construct)
{
zval *id, *doc;
xmlDocPtr docp = NULL;
@ -72,7 +72,7 @@ PHP_FUNCTION(dom_xpath_xpath)
php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp TSRMLS_CC);
}
}
/* }}} end dom_xpath_xpath */
/* }}} end DomXPath::__construct */
/* {{{ proto domdocument document document */
int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)