zend_class_entry *ce= sxe_class_entry;
zend_bool isprefix = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|Clsb", &filename, &filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|C!lsb", &filename, &filename_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
return;
}
RETURN_FALSE;
}
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->iter.nsprefix = ns_len ? xmlStrdup(ns) : NULL;
sxe->iter.isprefix = isprefix;
zend_class_entry *ce= sxe_class_entry;
zend_bool isprefix = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|Clsb", &data, &data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|C!lsb", &data, &data_len, &ce, &options, &ns, &ns_len, &isprefix) == FAILURE) {
return;
}
RETURN_FALSE;
}
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->iter.nsprefix = ns_len ? xmlStrdup(ns) : NULL;
sxe->iter.isprefix = isprefix;
xmlNodePtr nodep = NULL;
zend_class_entry *ce= sxe_class_entry;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|C", &node, &ce) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|C!", &node, &ce) == FAILURE) {
return;
}
}
if (nodep && nodep->type == XML_ELEMENT_NODE) {
+ if (!ce) {
+ ce = sxe_class_entry;
+ }
sxe = php_sxe_object_new(ce TSRMLS_CC);
sxe->document = object->document;
php_libxml_increment_doc_ref((php_libxml_node_object *)sxe, nodep->doc TSRMLS_CC);