• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RETURN_CTORW函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PHP_METHOD

/**
 * Return the lastest DI created
 *
 * @return Phalcon\DiInterface
 */
PHP_METHOD(Phalcon_DI, getDefault){

	zval default_di = {}, dependency_injector = {};

	phalcon_return_static_property_ce(&default_di, phalcon_di_ce, SL("_default"));
	if (Z_TYPE(default_di) != IS_OBJECT) {
		object_init_ex(&dependency_injector, phalcon_di_factorydefault_ce);
		PHALCON_CALL_METHODW(NULL, &dependency_injector, "__construct");
		RETURN_CTORW(&dependency_injector);
	}

	RETURN_CTORW(&default_di);
}
开发者ID:googlle,项目名称:cphalcon7,代码行数:18,代码来源:di.c


示例2: PHP_METHOD

/**
 * Creates a form registering it in the forms manager
 *
 * @param string $name
 * @param object $entity
 * @return Phalcon\Forms\Form
 */
PHP_METHOD(Phalcon_Forms_Manager, create){

	zval *name = NULL, *entity = NULL, form = {};

	phalcon_fetch_params(0, 0, 2, &name, &entity);

	if (!name) {
		name = &PHALCON_GLOBAL(z_null);
	}

	if (!entity) {
		entity = &PHALCON_GLOBAL(z_null);
	}

	if (Z_TYPE_P(name) != IS_STRING) {
		PHALCON_THROW_EXCEPTION_STRW(phalcon_forms_exception_ce, "The form name must be string");
		return;
	}

	object_init_ex(&form, phalcon_forms_form_ce);
	PHALCON_CALL_METHODW(NULL, &form, "__construct", entity);

	phalcon_update_property_array(getThis(), SL("_forms"), name, &form);

	RETURN_CTORW(&form);
}
开发者ID:googlle,项目名称:cphalcon7,代码行数:33,代码来源:manager.c


示例3: PHP_METHOD

/**
 * Returns a cached content
 *
 * @param int|string $keyName
 * @param   long $lifetime
 * @return  mixed
 */
PHP_METHOD(Phalcon_Cache_Backend_Memcache, get){

	zval *key_name, *lifetime = NULL, memcache = {}, frontend = {}, prefix = {}, prefixed_key = {}, cached_content = {};

	phalcon_fetch_params(0, 1, 1, &key_name, &lifetime);

	phalcon_return_property(&memcache, getThis(), SL("_memcache"));
	if (Z_TYPE(memcache) != IS_OBJECT) {
		PHALCON_CALL_METHODW(&memcache, getThis(), "_connect");
	}

	phalcon_return_property(&frontend, getThis(), SL("_frontend"));
	phalcon_return_property(&prefix, getThis(), SL("_prefix"));

	PHALCON_CONCAT_VV(&prefixed_key, &prefix, key_name);
	phalcon_update_property_zval(getThis(), SL("_lastKey"), &prefixed_key);

	PHALCON_CALL_METHODW(&cached_content, &memcache, "get", &prefixed_key);
	if (PHALCON_IS_FALSE(&cached_content)) {
		RETURN_NULL();
	}

	if (phalcon_is_numeric(&cached_content)) {
		RETURN_CTORW(&cached_content);
	}

	PHALCON_RETURN_CALL_METHOD(&frontend, "afterretrieve", &cached_content);
}
开发者ID:dreamsxin,项目名称:cphalcon7,代码行数:35,代码来源:memcache.c


示例4: PHP_METHOD

/**
 * Get label for field
 *
 * @param string field
 * @return string
 */
PHP_METHOD(Phalcon_Validation, getLabel) {

	zend_bool _0;
	zval *field, *labels = NULL, *value = NULL;

	zephir_fetch_params(0, 1, 0, &field);



	labels = zephir_fetch_nproperty_this(this_ptr, SL("_labels"), PH_NOISY_CC);
	_0 = Z_TYPE_P(labels) == IS_ARRAY;
	if (_0) {
		_0 = Z_TYPE_P(field) != IS_ARRAY;
	}
	if (_0) {
		if (zephir_array_isset_fetch(&value, labels, field, 1 TSRMLS_CC)) {
			RETURN_CTORW(value);
		}
	} else if (Z_TYPE_P(field) == IS_ARRAY) {
		zephir_fast_join_str(return_value, SL(", "), field TSRMLS_CC);
		return;
	}
	RETVAL_ZVAL(field, 1, 0);
	return;

}
开发者ID:SDpower,项目名称:cphalcon,代码行数:32,代码来源:validation.zep.c


示例5: PHP_METHOD

/**
 * Returns the complete location where the joined/filtered collection must be written
 *
 * @param string $basePath
 * @return string
 */
PHP_METHOD(Phalcon_Assets_Collection, getRealTargetPath){

	zval *base_path = NULL, *target_path, complete_path = {};

	phalcon_fetch_params(0, 0, 1, &base_path);

	if (!base_path) {
		base_path = &PHALCON_GLOBAL(z_null);
	}

	target_path = phalcon_read_property(getThis(), SL("_targetPath"), PH_NOISY);

	/** 
	 * A base path for resources can be set in the assets manager
	 */
	PHALCON_CONCAT_VV(&complete_path, base_path, target_path);

	/** 
	 * Get the real template path, the target path can optionally don't exist
	 */
	if (phalcon_file_exists(&complete_path) == SUCCESS) {
		phalcon_file_realpath(return_value, &complete_path);
		return;
	}

	RETURN_CTORW(&complete_path);
}
开发者ID:googlle,项目名称:cphalcon7,代码行数:33,代码来源:collection.c


示例6: PHP_METHOD

/**
 * Gets HTTP raw request body
 *
 * @return string
 */
PHP_METHOD(Phalcon_Http_Request, getRawBody)
{
	zval raw = {}, *zcontext = NULL;
	zend_string *content;
	php_stream_context *context;
	php_stream *stream;
	long int maxlen;

	phalcon_read_property(&raw, getThis(), SL("_rawBody"), PH_NOISY);
	if (Z_TYPE(raw) == IS_STRING) {
		RETURN_CTORW(&raw);
	}

	context = php_stream_context_from_zval(zcontext, 0);
	stream = php_stream_open_wrapper_ex("php://input", "rb", REPORT_ERRORS, NULL, context);
	maxlen    = PHP_STREAM_COPY_ALL;

	if (!stream) {
		RETURN_FALSE;
	}

	content = php_stream_copy_to_mem(stream, maxlen, 0);
	if (content != NULL) {
		RETVAL_STR(content);
		phalcon_update_property_zval(getThis(), SL("_rawBody"), return_value);
	} else {
		RETVAL_FALSE;
	}

	php_stream_close(stream);
}
开发者ID:dreamsxin,项目名称:cphalcon7,代码行数:36,代码来源:request.c


示例7: PHP_METHOD

PHP_METHOD(Test_Properties_StaticProtectedProperties, getSomeNullInitial) {

	zval *_0;


	_0 = zephir_fetch_static_property_ce(test_properties_staticprotectedproperties_ce, SL("someNullInitial") TSRMLS_CC);
	RETURN_CTORW(_0);

}
开发者ID:OctavioFuenzalida,项目名称:zephir,代码行数:9,代码来源:staticprotectedproperties.c


示例8: PHP_METHOD

PHP_METHOD(Test_Concat, getTestProperty) {

    zval *_0;


    _0 = zephir_fetch_static_property_ce(test_concat_ce, SL("testProperty") TSRMLS_CC);
    RETURN_CTORW(_0);

}
开发者ID:huzhaer,项目名称:zephir,代码行数:9,代码来源:concat.zep.c


示例9: PHP_METHOD

/**
 * Return the latest DI created
 */
PHP_METHOD(Phalcon_Di, getDefault) {

	zval *_0;


	_0 = zephir_fetch_static_property_ce(phalcon_di_ce, SL("_default") TSRMLS_CC);
	RETURN_CTORW(_0);

}
开发者ID:Studentsov,项目名称:cphalcon,代码行数:12,代码来源:di.zep.c


示例10: PHP_METHOD

/**
 * Returns the default Di container instance, or if one was not created
 * then created a new instance and set the default
 *
 * @return DiInterface
 */
PHP_METHOD(Pdm_Di_Container, getDefault) {

	zval *_0;


	_0 = zephir_fetch_static_property_ce(pdm_di_container_ce, SL("defaultInstance") TSRMLS_CC);
	RETURN_CTORW(_0);

}
开发者ID:brandonlamb,项目名称:php-datamapper,代码行数:15,代码来源:container.zep.c


示例11: PHP_METHOD

/**
 * @return boolean  TRUE if the grant type requires a redirect_uri, FALSE if not
 */
PHP_METHOD(OAuth2_ResponseType_AuthorizationCode, enforceRedirect) {

	zval *_0, *_1;


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("config"), PH_NOISY_CC);
	zephir_array_fetch_string(&_1, _0, SL("enforce_redirect"), PH_NOISY | PH_READONLY, "oauth2/responsetype/authorizationcode.zep", 74 TSRMLS_CC);
	RETURN_CTORW(_1);

}
开发者ID:noikiy,项目名称:php-oauth2-server,代码行数:13,代码来源:authorizationcode.zep.c


示例12: PHP_METHOD

PHP_METHOD(OAuth2_GrantType_JwtBearer, getUserId) {

	zval *_0, *_1;


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("jwt"), PH_NOISY_CC);
	zephir_array_fetch_string(&_1, _0, SL("sub"), PH_NOISY | PH_READONLY, "oauth2/granttype/jwtbearer.zep", 185 TSRMLS_CC);
	RETURN_CTORW(_1);

}
开发者ID:noikiy,项目名称:php-oauth2-server,代码行数:10,代码来源:jwtbearer.zep.c


示例13: PHP_METHOD

/**
 * Returns the current resource in the iterator
 */
PHP_METHOD(Phalcon_Assets_Collection, current) {

	zval *resource, *_0, *_1;


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_resources"), PH_NOISY_CC);
	_1 = zephir_fetch_nproperty_this(this_ptr, SL("_position"), PH_NOISY_CC);
	zephir_array_isset_fetch(&resource, _0, _1, 1 TSRMLS_CC);
	RETURN_CTORW(resource);

}
开发者ID:brainformatik,项目名称:cphalcon,代码行数:14,代码来源:collection.zep.c


示例14: PHP_METHOD

/**
 * Retrieve the URI path
 *
 * @return string
 */
PHP_METHOD(Phalcon_Http_Uri, getPath)
{
	zval parts = {}, value = {};

	phalcon_read_property(&parts, getThis(), SL("_parts"), PH_NOISY);

	if (!phalcon_array_isset_fetch_str(&value, &parts, SL("path"))) {
		 RETURN_NULL();
	}

	RETURN_CTORW(&value);
}
开发者ID:dreamsxin,项目名称:cphalcon7,代码行数:17,代码来源:uri.c


示例15: PHP_METHOD

/**
 * Returns the order clause in the criteria
 */
PHP_METHOD(Phalcon_Mvc_Model_Criteria, getOrder) {

	zval *order = NULL, *_0;


	_0 = zephir_fetch_nproperty_this(this_ptr, SL("_params"), PH_NOISY_CC);
	if (zephir_array_isset_string_fetch(&order, _0, SS("order"), 1 TSRMLS_CC)) {
		RETURN_CTORW(order);
	}
	RETURN_NULL();

}
开发者ID:8V017UW2RQ70,项目名称:cphalcon,代码行数:15,代码来源:criteria.zep.c


示例16: PHP_METHOD

PHP_METHOD(Test_Concat, getTestProperty) {

    zval _0;
    ZEPHIR_INIT_THIS();

    ZVAL_UNDEF(&_0);


    zephir_read_static_property_ce(&_0, test_concat_ce, SL("testProperty"), PH_NOISY_CC | PH_READONLY);
    RETURN_CTORW(_0);

}
开发者ID:tabalchi,项目名称:zephir,代码行数:12,代码来源:concat.zep.c


示例17: PHP_METHOD

PHP_METHOD(Test_Properties_StaticProtectedProperties, getSomeNull) {

	zval _0;
	ZEPHIR_INIT_THIS();

	ZVAL_UNDEF(&_0);


	zephir_read_static_property_ce(&_0, test_properties_staticprotectedproperties_ce, SL("someNull"), PH_NOISY_CC | PH_READONLY);
	RETURN_CTORW(_0);

}
开发者ID:8V017UW2RQ70,项目名称:zephir,代码行数:12,代码来源:staticprotectedproperties.zep.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ RETURN_ENUMERATOR函数代码示例发布时间:2022-05-30
下一篇:
C++ RETURN_CTOR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap