您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ zend_parse_method_parameters函数代码示例

51自学网 2021-06-03 11:57:17
  C++
这篇教程C++ zend_parse_method_parameters函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中zend_parse_method_parameters函数的典型用法代码示例。如果您正苦于以下问题:C++ zend_parse_method_parameters函数的具体用法?C++ zend_parse_method_parameters怎么用?C++ zend_parse_method_parameters使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了zend_parse_method_parameters函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: PHP_METHOD

/* {{{ proto string qqwry(string qqwry_path)*/PHP_METHOD(qqwry,__construct){	char *qqwry_path = NULL;	int qqwry_len;    zval * _this_zval = NULL;    if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,getThis(), "Os",&_this_zval,qqwry_class_entry_ptr, &qqwry_path,&qqwry_len) == FAILURE) {        return;    }	add_property_string(_this_zval,"f",qqwry_path,1);}
开发者ID:Jokder,项目名称:qqwry,代码行数:12,


示例2: PHP_FUNCTION

/* {{{ proto bool datefmt_set_calendar(IntlDateFormatter $mf, mixed $calendar) * Set formatter's calendar. */U_CFUNC PHP_FUNCTION(datefmt_set_calendar){	zval	*calendar_zv;	DATE_FORMAT_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz",			&object, IntlDateFormatter_ce_ptr, &calendar_zv) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC);		RETURN_FALSE;	}	DATE_FORMAT_METHOD_FETCH_OBJECT;	Calendar	*cal;	long		cal_type;	bool		cal_owned;	Locale		locale = Locale::createFromName(dfo->requested_locale);	// getting the actual locale from the DateFormat is not enough	// because we would have lost modifiers such as @calendar. We	// must store the requested locale on object creation	if (datefmt_process_calendar_arg(calendar_zv, locale,			"datefmt_set_calendar",	INTL_DATA_ERROR_P(dfo), cal, cal_type,			cal_owned TSRMLS_CC) == FAILURE) {		RETURN_FALSE;	}	if (cal_owned) {		/* a non IntlCalendar was specified, we want to keep the timezone */		TimeZone *old_timezone = fetch_datefmt(dfo)->getTimeZone().clone();		if (old_timezone == NULL) {			intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,					"datefmt_set_calendar: Out of memory when cloning calendar",					0 TSRMLS_CC);			delete cal;			RETURN_FALSE;		}		cal->adoptTimeZone(old_timezone);	} else {		cal = cal->clone();		if (cal == NULL) {			intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,					"datefmt_set_calendar: Out of memory when cloning calendar",					0 TSRMLS_CC);			RETURN_FALSE;		}	}	fetch_datefmt(dfo)->adoptCalendar(cal);	dfo->calendar = cal_type;	RETURN_TRUE;}
开发者ID:0,项目名称:php-src,代码行数:58,


示例3: PHP_FUNCTION

/* {{{ proto mixed tidy_getopt(string option)   Returns the value of the specified configuration option for the tidy document. */static PHP_FUNCTION(tidy_getopt){	PHPTidyObj *obj;	char *optname;	void *optval;	size_t optname_len;	TidyOption opt;	TidyOptionType optt;	TIDY_SET_CONTEXT;	if (object) {		if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &optname, &optname_len) == FAILURE) {			RETURN_FALSE;		}	} else {		if (zend_parse_method_parameters(ZEND_NUM_ARGS(), NULL, "Os", &object, tidy_ce_doc, &optname, &optname_len) == FAILURE) {			RETURN_FALSE;		}	}	obj = Z_TIDY_P(object);	opt = tidyGetOptionByName(obj->ptdoc->doc, optname);	if (!opt) {		php_error_docref(NULL, E_WARNING, "Unknown Tidy Configuration Option '%s'", optname);		RETURN_FALSE;	}	optval = php_tidy_get_opt_val(obj->ptdoc, opt, &optt);	switch (optt) {		case TidyString:			RETVAL_STR((zend_string*)optval);			return;		case TidyInteger:			RETURN_LONG((zend_long)optval);			break;		case TidyBoolean:			if (optval) {				RETURN_TRUE;			} else {				RETURN_FALSE;			}			break;		default:			php_error_docref(NULL, E_WARNING, "Unable to determine type of configuration option");			break;	}	RETURN_FALSE;}
开发者ID:CooCoooo,项目名称:php-src,代码行数:57,


示例4: ZEND_METHOD

/* {{{ proto Closure Closure::bind(callable old, object to [, mixed scope])   Create a closure from another one and bind to another object and scope */ZEND_METHOD(Closure, bind){	zval *newthis, *zclosure, *scope_arg = NULL;	zend_closure *closure, *new_closure;	zend_class_entry *ce, *called_scope;	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {		return;	}	closure = (zend_closure *)Z_OBJ_P(zclosure);	if (scope_arg != NULL) { /* scope argument was given */		if (Z_TYPE_P(scope_arg) == IS_OBJECT) {			ce = Z_OBJCE_P(scope_arg);		} else if (Z_TYPE_P(scope_arg) == IS_NULL) {			ce = NULL;		} else {			zend_string *class_name = zval_get_string(scope_arg);			if (zend_string_equals_literal(class_name, "static")) {				ce = closure->func.common.scope;			} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {				zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));				zend_string_release(class_name);				RETURN_NULL();			}			zend_string_release(class_name);		}	} else { /* scope argument not given; do not change the scope by default */		ce = closure->func.common.scope;	}	if (!zend_valid_closure_binding(closure, newthis, ce)) {		return;	}	if (newthis) {		called_scope = Z_OBJCE_P(newthis);	} else {		called_scope = ce;	}	zend_create_closure(return_value, &closure->func, ce, called_scope, newthis);	new_closure = (zend_closure *) Z_OBJ_P(return_value);	/* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */	if (ZEND_USER_CODE(closure->func.type) && (closure->func.common.scope != new_closure->func.common.scope || (closure->func.op_array.fn_flags & ZEND_ACC_NO_RT_ARENA))) {		new_closure->func.op_array.run_time_cache = emalloc(new_closure->func.op_array.cache_size);		memset(new_closure->func.op_array.run_time_cache, 0, new_closure->func.op_array.cache_size);		new_closure->func.op_array.fn_flags |= ZEND_ACC_NO_RT_ARENA;	}}
开发者ID:Jyhwenchai,项目名称:Share,代码行数:55,


示例5: ZEND_METHOD

/* {{{ proto Closure Closure::bind(Closure $old, object $to [, mixed $scope = "static" ] )   Create a closure from another one and bind to another object and scope */ZEND_METHOD(Closure, bind){    zval *newthis, *zclosure, *scope_arg = NULL;    zend_closure *closure;    zend_class_entry *ce, *called_scope;    if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {        RETURN_NULL();    }    closure = (zend_closure *)Z_OBJ_P(zclosure);    if ((newthis != NULL) && (closure->func.common.fn_flags & ZEND_ACC_STATIC)) {        zend_error(E_WARNING, "Cannot bind an instance to a static closure");    }    if (scope_arg != NULL) { /* scope argument was given */        if (Z_TYPE_P(scope_arg) == IS_OBJECT) {            ce = Z_OBJCE_P(scope_arg);        } else if (Z_TYPE_P(scope_arg) == IS_NULL) {            ce = NULL;        } else {            zend_string *class_name = zval_get_string(scope_arg);            if (zend_string_equals_literal(class_name, "static")) {                ce = closure->func.common.scope;            } else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {                zend_error(E_WARNING, "Class '%s' not found", class_name->val);                zend_string_release(class_name);                RETURN_NULL();            }            zend_string_release(class_name);        }        if(ce && ce != closure->func.common.scope && ce->type == ZEND_INTERNAL_CLASS) {            /* rebinding to internal class is not allowed */            zend_error(E_WARNING, "Cannot bind closure to scope of internal class %s", ce->name->val);            return;        }    } else { /* scope argument not given; do not change the scope by default */        ce = closure->func.common.scope;    }    if (newthis) {        called_scope = Z_OBJCE_P(newthis);    } else {        called_scope = ce;    }    zend_create_closure(return_value, &closure->func, ce, called_scope, newthis);}
开发者ID:sonivaibhv,项目名称:php-src,代码行数:51,


示例6: PHP_FUNCTION

U_CFUNC PHP_FUNCTION(intltz_use_daylight_time){	TIMEZONE_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",			&object, TimeZone_ce_ptr) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intltz_use_daylight_time: bad arguments", 0);		RETURN_FALSE;	}	TIMEZONE_METHOD_FETCH_OBJECT;	RETURN_BOOL(to->utimezone->useDaylightTime());}
开发者ID:GreenLightt,项目名称:php-src,代码行数:15,


示例7: PHP_FUNCTION

U_CFUNC PHP_FUNCTION(intltz_get_raw_offset){	TIMEZONE_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),			"O", &object, TimeZone_ce_ptr) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intltz_get_raw_offset: bad arguments", 0 TSRMLS_CC);		RETURN_FALSE;	}	TIMEZONE_METHOD_FETCH_OBJECT;	RETURN_LONG(to->utimezone->getRawOffset());}
开发者ID:Credochen,项目名称:php-src,代码行数:15,


示例8: PHP_FUNCTION

U_CFUNC PHP_FUNCTION(intlgregcal_get_gregorian_change){	CALENDAR_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),			"O", &object, GregorianCalendar_ce_ptr) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intlgregcal_get_gregorian_change: bad arguments", 0 TSRMLS_CC);		RETURN_FALSE;	}	CALENDAR_METHOD_FETCH_OBJECT;		RETURN_DOUBLE((double)fetch_greg(co)->getGregorianChange());}
开发者ID:forgotting,项目名称:php-src,代码行数:15,


示例9: PHP_FUNCTION

U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option){	CALENDAR_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),			"O", &object, Calendar_ce_ptr) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intlcal_get_skipped_wall_time_option: bad arguments", 0 TSRMLS_CC);		RETURN_FALSE;	}	CALENDAR_METHOD_FETCH_OBJECT;	RETURN_LONG(co->ucal->getSkippedWallTimeOption());}
开发者ID:forgotting,项目名称:php-src,代码行数:15,


示例10: PHP_METHOD

/* {{{ constructor, create one new instance like this: * $client = new McpackHessianClient('http://xxxx', array('xxx' => 'xxx')), * method's declaration is McpackHessianClient($strUrl, $arrOptions). **/PHP_METHOD(McpackHessianClient, __construct) {	zend_class_entry *ce;	zval *url, *options, *p_this;	MAKE_STD_ZVAL(options);	array_init(options);	p_this = getThis();    if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, p_this,				"Oz|z", &ce, mcphessian_ce_ptr, &url, &options) == FAILURE) {		return;	}	// set the properties of instance	zend_update_property(mcphessian_ce_ptr, p_this, ZEND_STRL("url"), url TSRMLS_CC);	zend_update_property(mcphessian_ce_ptr, p_this, ZEND_STRL("options"), options TSRMLS_CC);}
开发者ID:Raaaay,项目名称:mcphessian,代码行数:20,


示例11: PHP_FUNCTION

U_CFUNC PHP_FUNCTION(intltz_get_display_name){	zend_bool	daylight		= 0;	zend_long		display_type	= TimeZone::LONG;	const char	*locale_str		= NULL;	size_t			dummy			= 0;	TIMEZONE_METHOD_INIT_VARS;	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),			"O|bls!", &object, TimeZone_ce_ptr, &daylight, &display_type,			&locale_str, &dummy) == FAILURE) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intltz_get_display_name: bad arguments", 0);		RETURN_FALSE;	}	bool found = false;	for (int i = 0; !found && i < sizeof(display_types)/sizeof(*display_types); i++) {		if (display_types[i] == display_type)			found = true;	}	if (!found) {		intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,			"intltz_get_display_name: wrong display type", 0);		RETURN_FALSE;	}	if (!locale_str) {		locale_str = intl_locale_get_default();	}	TIMEZONE_METHOD_FETCH_OBJECT;	UnicodeString result;	to->utimezone->getDisplayName((UBool)daylight, (TimeZone::EDisplayType)display_type,		Locale::createFromName(locale_str), result);	char *str;	int str_len;	intl_convert_utf16_to_utf8(&str, &str_len, result.getBuffer(), result.length(), TIMEZONE_ERROR_CODE_P(to));	INTL_METHOD_CHECK_STATUS(to, "intltz_get_display_name: "		"could not convert resulting time zone id to UTF-16");	RETVAL_STRINGL(str, str_len);	//????	efree(str);}
开发者ID:AmesianX,项目名称:php-src,代码行数:47,


示例12: PHP_METHOD

PHP_METHOD(pdo_connect_pool_PDOStatement, __call) {    zval *z_args;    zval *object;    zval *pass_data;    zval **zres, **source_zval;    char *cmd;    int cmd_len;    if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osa", &object, pdo_connect_pool_PDOStatement_class_entry_ptr, &cmd, &cmd_len, &z_args) == FAILURE) {        RETURN_FALSE;    }    cpClient *cli;    if (zend_hash_find(Z_OBJPROP_P(getThis()), ZEND_STRS("cli"), (void **) &zres) == SUCCESS) {        ZEND_FETCH_RESOURCE(cli, cpClient*, zres, -1, CP_RES_CLIENT_NAME, le_cli_connect_pool);    } else {
开发者ID:GXhua,项目名称:php-connect-pool,代码行数:17,


示例13: PHP_METHOD

/* {{{ proto void DOMXPath::__construct(DOMDocument doc) U */PHP_METHOD(domxpath, __construct){	zval *id, *doc;	xmlDocPtr docp = NULL;	dom_object *docobj;	dom_xpath_object *intern;	xmlXPathContextPtr ctx, oldctx;	zend_error_handling error_handling;	zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) {		zend_restore_error_handling(&error_handling TSRMLS_CC);		return;	}	zend_restore_error_handling(&error_handling TSRMLS_CC);	DOM_GET_OBJ(docp, doc, xmlDocPtr, docobj);	ctx = xmlXPathNewContext(docp);	if (ctx == NULL) {		php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC);		RETURN_FALSE;	}	intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC);	if (intern != NULL) {		oldctx = (xmlXPathContextPtr)intern->ptr;		if (oldctx != NULL) {			php_libxml_decrement_doc_ref((php_libxml_node_object *)intern TSRMLS_CC);			xmlXPathFreeContext(oldctx);		}		xmlXPathRegisterFuncNS (ctx, (const xmlChar *) "functionString",					   (const xmlChar *) "http://php.net/xpath",					   dom_xpath_ext_function_string_php);		xmlXPathRegisterFuncNS (ctx, (const xmlChar *) "function",					   (const xmlChar *) "http://php.net/xpath",					   dom_xpath_ext_function_object_php);		intern->ptr = ctx;		ctx->userData = (void *)intern;		intern->document = docobj->document;		php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp TSRMLS_CC);	}}
开发者ID:AzerTyQsdF,项目名称:osx,代码行数:46,


示例14: PHP_METHOD

/* {{{ proto boolean XMLReader::expand()Moves the position of the current instance to the next node in the stream. */PHP_METHOD(xmlreader, expand){#ifdef HAVE_DOM	zval *id, *basenode = NULL;	int ret;	xmlreader_object *intern;	xmlNode *node, *nodec;	xmlDocPtr docp = NULL;	php_libxml_node_object *domobj = NULL;	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|O!", &id, xmlreader_class_entry, &basenode, dom_node_class_entry) == FAILURE) {		return;	}	if (basenode != NULL) {		NODE_GET_OBJ(node, basenode, xmlNodePtr, domobj);		docp = node->doc;	}	intern = Z_XMLREADER_P(id);	if (intern && intern->ptr) {		node = xmlTextReaderExpand(intern->ptr);		if (node == NULL) {			php_error_docref(NULL, E_WARNING, "An Error Occurred while expanding ");			RETURN_FALSE;		} else {			nodec = xmlDocCopyNode(node, docp, 1);			if (nodec == NULL) {				php_error_docref(NULL, E_NOTICE, "Cannot expand this node type");				RETURN_FALSE;			} else {				DOM_RET_OBJ(nodec, &ret, (dom_object *)domobj);			}		}	} else {		php_error_docref(NULL, E_WARNING, "Load Data before trying to expand");		RETURN_FALSE;	}#else	php_error(E_WARNING, "DOM support is not enabled");	return;#endif}
开发者ID:LTD-Beget,项目名称:php-src,代码行数:47,


示例15: ZEND_METHOD

/* {{{ proto Closure Closure::bind(callable old, object to [, mixed scope])   Create a closure from another one and bind to another object and scope */ZEND_METHOD(Closure, bind){	zval *newthis, *zclosure, *scope_arg = NULL;	zend_closure *closure;	zend_class_entry *ce, *called_scope;	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {		return;	}	closure = (zend_closure *)Z_OBJ_P(zclosure);	if (scope_arg != NULL) { /* scope argument was given */		if (Z_TYPE_P(scope_arg) == IS_OBJECT) {			ce = Z_OBJCE_P(scope_arg);		} else if (Z_TYPE_P(scope_arg) == IS_NULL) {			ce = NULL;		} else {			zend_string *tmp_class_name;			zend_string *class_name = zval_get_tmp_string(scope_arg, &tmp_class_name);			if (zend_string_equals_literal(class_name, "static")) {				ce = closure->func.common.scope;			} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {				zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));				zend_string_release_ex(class_name, 0);				RETURN_NULL();			}			zend_tmp_string_release(tmp_class_name);		}	} else { /* scope argument not given; do not change the scope by default */		ce = closure->func.common.scope;	}	if (!zend_valid_closure_binding(closure, newthis, ce)) {		return;	}	if (newthis) {		called_scope = Z_OBJCE_P(newthis);	} else {		called_scope = ce;	}	zend_create_closure(return_value, &closure->func, ce, called_scope, newthis);}
开发者ID:Mingyangzu,项目名称:php-src,代码行数:47,


示例16: PHP_METHOD

/* {{{ proto bool MarkdownDocument::initFromStream(mixed $markdown_stream [, int $flags = 0]) *	   Initializes a markdown document from a stream. */PHP_METHOD(markdowndoc, initFromStream){	zval			*this, *zstream;	long			flags	= 0;	int				ret;	if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz|l",			&this, markdowndoc_ce, &zstream, &flags) == FAILURE) {		RETURN_FALSE;	}	ret = markdown_init_from_stream(this, zstream, flags TSRMLS_CC);	if (ret == FAILURE) {		RETURN_FALSE; /* no rollback needed */	}	RETURN_TRUE;}
开发者ID:koenpunt,项目名称:php-discount,代码行数:20,


示例17: PHP_METHOD

/* {{{ proto void DOMAttr::__construct(string name, [string value]); */PHP_METHOD(domattr, __construct){	zval *id;	xmlAttrPtr nodep = NULL;	xmlNodePtr oldnode = NULL;	dom_object *intern;	char *name, *value = NULL;	int name_len, value_len, name_valid;	zend_error_handling error_handling;	zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);	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) {		zend_restore_error_handling(&error_handling TSRMLS_CC);		return;	}	zend_restore_error_handling(&error_handling TSRMLS_CC);	intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);	name_valid = xmlValidateName((xmlChar *) name, 0);	if (name_valid != 0) {		php_dom_throw_error(INVALID_CHARACTER_ERR, 1 TSRMLS_CC);		RETURN_FALSE;	}	nodep = xmlNewProp(NULL, (xmlChar *) name, value);	if (!nodep) {		php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC);		RETURN_FALSE;	}	if (intern != NULL) {		oldnode = dom_object_get_node(intern);		if (oldnode != NULL) {			php_libxml_node_free_resource(oldnode  TSRMLS_CC);		}		php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)nodep, (void *)intern TSRMLS_CC);	}}
开发者ID:lennonchan,项目名称:TeamTalk,代码行数:42,


示例18: PHP_METHOD

/* {{{ proto void DOMEntityReference::__construct(string name); */PHP_METHOD(domentityreference, __construct){	zval *id;	xmlNode *node;	xmlNodePtr oldnode = NULL;	dom_object *intern;	char *name;	size_t name_len, name_valid;	zend_error_handling error_handling;	zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling);	if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) {		zend_restore_error_handling(&error_handling);		return;	}	zend_restore_error_handling(&error_handling);	name_valid = xmlValidateName((xmlChar *) name, 0);	if (name_valid != 0) {		php_dom_throw_error(INVALID_CHARACTER_ERR, 1);		RETURN_FALSE;	}	node = xmlNewReference(NULL, (xmlChar *) name);	if (!node) {		php_dom_throw_error(INVALID_STATE_ERR, 1);		RETURN_FALSE;	}	intern = Z_DOMOBJ_P(id);	if (intern != NULL) {		oldnode = dom_object_get_node(intern);		if (oldnode != NULL) {			php_libxml_node_free_resource(oldnode );		}		php_libxml_increment_node_ptr((php_libxml_node_object *)intern, node, (void *)intern);	}}
开发者ID:Jille,项目名称:php-src,代码行数:41,



注:本文中的zend_parse_method_parameters函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ zend_parse_parameters函数代码示例
C++ zend_object_store_get_object函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。