char *name, *value = NULL;
int name_len, value_len;
- id = getThis();
- intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_attr_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
+ intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
+
if (name_len == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attribute name is required");
RETURN_FALSE;
{NULL, NULL, NULL}
};
-/* {{{ proto domnode dom_cdatasection_cdatasection([string value]); */
+/* {{{ proto domnode dom_cdatasection_cdatasection(string value); */
PHP_FUNCTION(dom_cdatasection_cdatasection)
{
char *value = NULL;
int value_len;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_cdatasection_class_entry, &value, &value_len) == FAILURE) {
return;
}
-
nodep = xmlNewCDataBlock(NULL, (xmlChar *) value, value_len);
if (!nodep)
char *value = NULL;
int value_len;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_comment_class_entry, &value, &value_len) == FAILURE) {
return;
}
dom_object *intern;
char *encoding, *version = NULL;
int encoding_len = 0, version_len = 0, refcount;
-
- id = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ss", &version, &version_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) {
return;
}
xmlNodePtr nodep = NULL, oldnode = NULL;
dom_object *intern;
- id = getThis();
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) {
+ return;
+ }
nodep = xmlNewDocFragment(NULL);
char *name, *value = NULL;
int name_len, value_len = 0;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
char *name;
int name_len;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) {
return;
}
xmlNodePtr nodep;
xmlNotation *notep = NULL;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &named, &namedlen) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_namednodemap_class_entry, &named, &namedlen) == FAILURE) {
return;
}
xmlNodePtr nodep, curnode;
int count;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_namednodemap_class_entry, &index) == FAILURE) {
return;
}
xmlNodePtr nodep;
xmlNotation *notep = NULL;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uri, &urilen, &named, &namedlen) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_namednodemap_class_entry, &uri, &urilen, &named, &namedlen) == FAILURE) {
return;
}
HashTable *nodeht;
pval **entry;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_nodelist_class_entry, &index) == FAILURE) {
return;
}
#if HAVE_LIBXML && HAVE_DOM
#include "ext/standard/php_rand.h"
#include "php_dom.h"
-#include "dom_ce.h"
#include "dom_properties.h"
#include "ext/standard/info.h"
#include "xml_common.h"
#include "ext/libxml/php_libxml.h"
#include "zend_default_classes.h"
+#include "dom_ce.h"
/* DOM API_VERSION, please bump it up, if you change anything in the API
therefore it's easier for the script-programmers to check, what's working how
Can be checked with phpversion("dom");
char *name, *value = NULL;
int name_len, value_len;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
char *value = NULL;
int value_len;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &value, &value_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) {
return;
}
dom_object *docobj, *intern;
xmlXPathContextPtr ctx, oldctx;
- id = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &doc) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &id, dom_xpath_class_entry, &doc) == FAILURE) {
return;
}