本文整理汇总了C++中zephir_check_temp_parameter函数的典型用法代码示例。如果您正苦于以下问题:C++ zephir_check_temp_parameter函数的具体用法?C++ zephir_check_temp_parameter怎么用?C++ zephir_check_temp_parameter使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zephir_check_temp_parameter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PHP_METHOD
/**
* Initializes the session bag. This method must not be called directly, the
* class calls it when its internal data is accessed
*/
PHP_METHOD(Phalcon_Session_Bag, initialize) {
zval *session = NULL, *dependencyInjector = NULL, *data = NULL, *_2, *_1$$3;
zend_long ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_0 = NULL;
ZEPHIR_MM_GROW();
ZEPHIR_OBS_VAR(session);
zephir_read_property_this(&session, this_ptr, SL("_session"), PH_NOISY_CC);
if (Z_TYPE_P(session) != IS_OBJECT) {
ZEPHIR_OBS_VAR(dependencyInjector);
zephir_read_property_this(&dependencyInjector, this_ptr, SL("_dependencyInjector"), PH_NOISY_CC);
if (Z_TYPE_P(dependencyInjector) != IS_OBJECT) {
ZEPHIR_CALL_CE_STATIC(&dependencyInjector, phalcon_di_ce, "getdefault", &_0, 1);
zephir_check_call_status();
if (Z_TYPE_P(dependencyInjector) != IS_OBJECT) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_session_exception_ce, "A dependency injection object is required to access the 'session' service", "phalcon/session/bag.zep", 91);
return;
}
}
ZEPHIR_INIT_VAR(_1$$3);
ZVAL_STRING(_1$$3, "session", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(&session, dependencyInjector, "getshared", NULL, 0, _1$$3);
zephir_check_temp_parameter(_1$$3);
zephir_check_call_status();
zephir_update_property_this(getThis(), SL("_session"), session TSRMLS_CC);
}
_2 = zephir_fetch_nproperty_this(this_ptr, SL("_name"), PH_NOISY_CC);
ZEPHIR_CALL_METHOD(&data, session, "get", NULL, 0, _2);
zephir_check_call_status();
if (Z_TYPE_P(data) != IS_ARRAY) {
ZEPHIR_INIT_NVAR(data);
array_init(data);
}
zephir_update_property_this(getThis(), SL("_data"), data TSRMLS_CC);
if (1) {
zephir_update_property_this(getThis(), SL("_initialized"), ZEPHIR_GLOBAL(global_true) TSRMLS_CC);
} else {
zephir_update_property_this(getThis(), SL("_initialized"), ZEPHIR_GLOBAL(global_false) TSRMLS_CC);
}
ZEPHIR_MM_RESTORE();
}
示例2: PHP_METHOD
/**
* @param \Ouchbase\Entity entity
* @param string|null cas
* @throws \Ouchbase\Exception\EntityLogicException
* @return this
*/
PHP_METHOD(Ouchbase_UnitOfWork, persist) {
zval *_5;
int ZEPHIR_LAST_CALL_STATUS;
zephir_nts_static zephir_fcall_cache_entry *_2 = NULL;
zval *entity, *cas = NULL, *_0, *_1 = NULL, *_3, *_4, *_6 = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &entity, &cas);
if (!cas) {
cas = ZEPHIR_GLOBAL(global_null);
}
if (!(zephir_instance_of_ev(entity, ouchbase_entity_ce TSRMLS_CC))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'entity' must be an instance of 'Ouchbase\\Entity'", "", 0);
return;
}
_0 = zephir_fetch_nproperty_this(this_ptr, SL("deleted"), PH_NOISY_CC);
ZEPHIR_CALL_CE_STATIC(&_1, ouchbase__etc_ce, "getentityhash", &_2, entity);
zephir_check_call_status();
if (zephir_array_isset(_0, _1)) {
ZEPHIR_INIT_VAR(_3);
object_init_ex(_3, ouchbase_exception_entitylogicexception_ce);
ZEPHIR_INIT_VAR(_4);
ZVAL_STRING(_4, "was marked as deleted", 0);
ZEPHIR_CALL_METHOD(NULL, _3, "__construct", NULL, entity, _4);
zephir_check_temp_parameter(_4);
zephir_check_call_status();
zephir_throw_exception_debug(_3, "ouchbase/UnitOfWork.zep", 49 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_INIT_VAR(_5);
array_init_size(_5, 3);
zephir_array_fast_append(_5, entity);
zephir_array_fast_append(_5, cas);
ZEPHIR_CALL_CE_STATIC(&_6, ouchbase__etc_ce, "getentityhash", &_2, entity);
zephir_check_call_status();
zephir_update_property_array(this_ptr, SL("persisted"), _6, _5 TSRMLS_CC);
RETURN_THIS();
}
示例3: PHP_METHOD
/**
* Constructor.
*/
PHP_METHOD(Xpl_HtmlElement, __construct) {
zval *_0, *_1 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "div", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "settag", NULL, 0, _0);
zephir_check_temp_parameter(_0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_1, this_ptr, "getdefaultattributes", NULL, 0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, this_ptr, "setattributes", NULL, 0, _1);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例4: PHP_METHOD
/**
* Simply closes the connection.
*/
PHP_METHOD(Phalcon_Queue_Beanstalk, quit) {
zval *_0, *_1;
int ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "quit", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "write", NULL, 0, _0);
zephir_check_temp_parameter(_0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, this_ptr, "disconnect", NULL, 0);
zephir_check_call_status();
ZEPHIR_OBS_VAR(_1);
zephir_read_property_this(&_1, this_ptr, SL("_connection"), PH_NOISY_CC);
RETURN_MM_BOOL(Z_TYPE_P(_1) != IS_RESOURCE);
}
示例5: PHP_METHOD
PHP_METHOD(Test_Exceptions, testException5) {
int ZEPHIR_LAST_CALL_STATUS;
zval *exception, *_0;
ZEPHIR_MM_GROW();
ZEPHIR_INIT_VAR(exception);
object_init_ex(exception, test_exception_ce);
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "hello5", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(NULL, exception, "__construct", NULL, 28, _0);
zephir_check_temp_parameter(_0);
zephir_check_call_status();
zephir_throw_exception_debug(exception, "test/exceptions.zep", 46 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
return;
}
示例6: PHP_METHOD
/**
* Phalcon\Assets\Inline\Css
*
* @param string content
* @param boolean filter
* @param array attributes
*/
PHP_METHOD(Phalcon_Assets_Inline_Css, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zephir_fcall_cache_entry *_0 = NULL;
zend_bool filter;
zval *content_param = NULL, *filter_param = NULL, *attributes = NULL, *_1, *_2;
zval *content = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 2, &content_param, &filter_param, &attributes);
zephir_get_strval(content, content_param);
if (!filter_param) {
filter = 1;
} else {
filter = zephir_get_boolval(filter_param);
}
if (!attributes) {
ZEPHIR_CPY_WRT(attributes, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(attributes);
}
if (Z_TYPE_P(attributes) == IS_NULL) {
ZEPHIR_INIT_NVAR(attributes);
zephir_create_array(attributes, 1, 0 TSRMLS_CC);
add_assoc_stringl_ex(attributes, SS("type"), SL("text/css"), 1);
}
ZEPHIR_INIT_VAR(_1);
ZVAL_STRING(_1, "css", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_INIT_VAR(_2);
if (filter) {
ZVAL_BOOL(_2, 1);
} else {
ZVAL_BOOL(_2, 0);
}
ZEPHIR_CALL_PARENT(NULL, phalcon_assets_inline_css_ce, this_ptr, "__construct", &_0, 104, _1, content, _2, attributes);
zephir_check_temp_parameter(_1);
zephir_check_call_status();
ZEPHIR_MM_RESTORE();
}
示例7: PHP_METHOD
/**
* Retrieve the language
* @return string
*/
PHP_METHOD(Yaf_Request_Abstract, getLanguage) {
int ZEPHIR_LAST_CALL_STATUS;
zval *_0, *_1 = NULL, *_2;
ZEPHIR_MM_GROW();
_0 = zephir_fetch_nproperty_this(this_ptr, SL("language"), PH_NOISY_CC);
if (Z_TYPE_P(_0) == IS_NULL) {
ZEPHIR_INIT_VAR(_2);
ZVAL_STRING(_2, "HTTP_ACCEPT_LANGUAGE", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(&_1, this_ptr, "getenv", NULL, _2);
zephir_check_temp_parameter(_2);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("language"), _1 TSRMLS_CC);
}
RETURN_MM_MEMBER(this_ptr, "language");
}
示例8: PHP_METHOD
PHP_METHOD(PhalconPlus_RPC_Client_Adapter_Local, __construct) {
int ZEPHIR_LAST_CALL_STATUS;
zval *di, *_0 = NULL, *_1;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &di);
zephir_update_property_this(this_ptr, SL("di"), di TSRMLS_CC);
ZEPHIR_INIT_VAR(_1);
ZVAL_STRING(_1, "config", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(&_0, di, "get", NULL, _1);
zephir_check_temp_parameter(_1);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("config"), _0 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
}
示例9: PHP_METHOD
/**
* Shows a HTML success message
*
*<code>
* $flash->success('The process was finished successfully');
*</code>
*/
PHP_METHOD(Phalcon_Flash, success) {
int ZEPHIR_LAST_CALL_STATUS;
zval *message_param = NULL, *_0;
zval *message = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &message_param);
zephir_get_strval(message, message_param);
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "success", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_RETURN_CALL_METHOD(this_ptr, "message", NULL, 0, _0, message);
zephir_check_temp_parameter(_0);
zephir_check_call_status();
RETURN_MM();
}
示例10: PHP_METHOD
/**
* @param \Ouchbase\Entity entity
* @return this
*/
PHP_METHOD(Ouchbase_Repository, insert) {
zval *_0;
int ZEPHIR_LAST_CALL_STATUS;
zval *entity, *data = NULL, *_1 = NULL, *_2 = NULL, *_3, *_4, *_5;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &entity);
if (!(zephir_instance_of_ev(entity, ouchbase_entity_ce TSRMLS_CC))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'entity' must be an instance of 'Ouchbase\\Entity'", "", 0);
return;
}
ZEPHIR_CALL_METHOD(&data, this_ptr, "toarray", NULL, entity);
zephir_check_call_status();
ZEPHIR_INIT_VAR(_0);
array_init_size(_0, 3);
ZEPHIR_CALL_METHOD(&_2, entity, "getid", NULL);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_1, this_ptr, "getkey", NULL, _2);
zephir_check_call_status();
zephir_array_fast_append(_0, _1);
ZEPHIR_INIT_VAR(_3);
zephir_json_encode(_3, &(_3), data, 0 TSRMLS_CC);
zephir_array_fast_append(_0, _3);
ZEPHIR_INIT_BNVAR(_3);
ZVAL_STRING(_3, "set", 0);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "executewithouttimeouts", NULL, _3, _0);
zephir_check_temp_parameter(_3);
zephir_check_call_status();
_4 = zephir_fetch_nproperty_this(this_ptr, SL("uow"), PH_NOISY_CC);
ZEPHIR_CALL_METHOD(NULL, _4, "persist", NULL, entity);
zephir_check_call_status();
_5 = zephir_fetch_nproperty_this(this_ptr, SL("im"), PH_NOISY_CC);
ZEPHIR_CALL_METHOD(NULL, _5, "updateoriginaldata", NULL, entity, data);
zephir_check_call_status();
RETURN_THIS();
}
示例11: PHP_METHOD
/**
* @param \Ouchbase\Entity entity
* @return this
* @throws \Ouchbase\Exception\EntityLogicException
*/
PHP_METHOD(Ouchbase_IdentityMap, unregister) {
zend_class_entry *_3;
int ZEPHIR_LAST_CALL_STATUS;
zephir_nts_static zephir_fcall_cache_entry *_0 = NULL;
zval *entity, *hash = NULL, *_1, *_2, *_4, *_5, *_6;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &entity);
if (!(zephir_instance_of_ev(entity, ouchbase_entity_ce TSRMLS_CC))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_InvalidArgumentException, "Parameter 'entity' must be an instance of 'Ouchbase\\Entity'", "", 0);
return;
}
ZEPHIR_CALL_CE_STATIC(&hash, ouchbase__etc_ce, "getentityhash", &_0, entity);
zephir_check_call_status();
_1 = zephir_fetch_nproperty_this(this_ptr, SL("entities"), PH_NOISY_CC);
if (!(zephir_array_isset(_1, hash))) {
ZEPHIR_INIT_VAR(_2);
_3 = zend_fetch_class(SL("Ouchbase\\EntityLogicException"), ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
object_init_ex(_2, _3);
if (zephir_has_constructor(_2 TSRMLS_CC)) {
ZEPHIR_INIT_VAR(_4);
ZVAL_STRING(_4, "is not registered in the identity map", 0);
ZEPHIR_CALL_METHOD(NULL, _2, "__construct", NULL, entity, _4);
zephir_check_temp_parameter(_4);
zephir_check_call_status();
}
zephir_throw_exception_debug(_2, "ouchbase/IdentityMap.zep", 51 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
return;
}
_5 = zephir_fetch_nproperty_this(this_ptr, SL("entities"), PH_NOISY_CC);
zephir_array_unset(&_5, hash, PH_SEPARATE);
_6 = zephir_fetch_nproperty_this(this_ptr, SL("originalData"), PH_NOISY_CC);
zephir_array_unset(&_6, hash, PH_SEPARATE);
RETURN_THIS();
}
示例12: PHP_METHOD
/**
* Adds a route to the router that only match if the HTTP method is HEAD
*
* @param string pattern
* @param string/array paths
* @return Test\Router\Route
*/
PHP_METHOD(Test_Router, addHead) {
int ZEPHIR_LAST_CALL_STATUS;
zval *pattern, *paths = NULL, *_0;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 1, &pattern, &paths);
if (!paths) {
paths = ZEPHIR_GLOBAL(global_null);
}
ZEPHIR_INIT_VAR(_0);
ZVAL_STRING(_0, "HEAD", 0);
ZEPHIR_RETURN_CALL_METHOD(this_ptr, "add", NULL, pattern, paths, _0);
zephir_check_temp_parameter(_0);
zephir_check_call_status();
RETURN_MM();
}
示例13: PHP_METHOD
/**
* Compare strings
*/
PHP_METHOD(Phalcon_Validation_Validator_Confirmation, compare) {
zephir_fcall_cache_entry *_5 = NULL;
int ZEPHIR_LAST_CALL_STATUS;
zval *a_param = NULL, *b_param = NULL, *_0 = NULL, *_1, *_2, _3$$3 = zval_used_for_init, *_4$$3 = NULL, *_6$$3 = NULL;
zval *a = NULL, *b = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &a_param, &b_param);
zephir_get_strval(a, a_param);
zephir_get_strval(b, b_param);
ZEPHIR_INIT_VAR(_1);
ZVAL_STRING(_1, "ignoreCase", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_INIT_VAR(_2);
ZVAL_BOOL(_2, 0);
ZEPHIR_CALL_METHOD(&_0, this_ptr, "getoption", NULL, 0, _1, _2);
zephir_check_temp_parameter(_1);
zephir_check_call_status();
if (zephir_is_true(_0)) {
if (!((zephir_function_exists_ex(SS("mb_strtolower") TSRMLS_CC) == SUCCESS))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_validation_exception_ce, "Extension 'mbstring' is required", "phalcon/validation/validator/confirmation.zep", 122);
return;
}
ZEPHIR_SINIT_VAR(_3$$3);
ZVAL_STRING(&_3$$3, "utf-8", 0);
ZEPHIR_CALL_FUNCTION(&_4$$3, "mb_strtolower", &_5, 200, a, &_3$$3);
zephir_check_call_status();
zephir_get_strval(a, _4$$3);
ZEPHIR_SINIT_NVAR(_3$$3);
ZVAL_STRING(&_3$$3, "utf-8", 0);
ZEPHIR_CALL_FUNCTION(&_6$$3, "mb_strtolower", &_5, 200, b, &_3$$3);
zephir_check_call_status();
zephir_get_strval(b, _6$$3);
}
RETURN_MM_BOOL(ZEPHIR_IS_EQUAL(a, b));
}
示例14: PHP_METHOD
/**
* Sets Cache headers to use HTTP cache
*
*<code>
* $this->response->setCache(60);
*</code>
*/
PHP_METHOD(Phalcon_Http_Response, setCache) {
zval *_1, *_3;
zval *minutes_param = NULL, *date, _0, _2, *_4;
int minutes, ZEPHIR_LAST_CALL_STATUS;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &minutes_param);
if (unlikely(Z_TYPE_P(minutes_param) != IS_LONG)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'minutes' must be a int") TSRMLS_CC);
RETURN_MM_NULL();
}
minutes = Z_LVAL_P(minutes_param);
ZEPHIR_INIT_VAR(date);
object_init_ex(date, php_date_get_date_ce());
ZEPHIR_CALL_METHOD(NULL, date, "__construct", NULL, 0);
zephir_check_call_status();
ZEPHIR_SINIT_VAR(_0);
ZVAL_LONG(&_0, minutes);
ZEPHIR_INIT_VAR(_1);
ZEPHIR_CONCAT_SVS(_1, "+", &_0, " minutes");
ZEPHIR_CALL_METHOD(NULL, date, "modify", NULL, 0, _1);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(NULL, this_ptr, "setexpires", NULL, 0, date);
zephir_check_call_status();
ZEPHIR_SINIT_VAR(_2);
ZVAL_LONG(&_2, ((minutes * 60)));
ZEPHIR_INIT_VAR(_3);
ZEPHIR_CONCAT_SV(_3, "max-age=", &_2);
ZEPHIR_INIT_VAR(_4);
ZVAL_STRING(_4, "Cache-Control", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(NULL, this_ptr, "setheader", NULL, 0, _4, _3);
zephir_check_temp_parameter(_4);
zephir_check_call_status();
RETURN_THIS();
}
示例15: PHP_METHOD
PHP_METHOD(Yb_Std, outputScript) {
int ZEPHIR_LAST_CALL_STATUS;
zval *data = NULL;
zval *path_param = NULL, *data_param = NULL, *_0$$3, *_2, *_3;
zval *path = NULL, *_1$$3;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &path_param, &data_param);
zephir_get_strval(path, path_param);
zephir_get_arrval(data, data_param);
if (unlikely(!((zephir_file_exists(path TSRMLS_CC) == SUCCESS)))) {
ZEPHIR_INIT_VAR(_0$$3);
object_init_ex(_0$$3, yb_exception_ce);
ZEPHIR_INIT_VAR(_1$$3);
ZEPHIR_CONCAT_SV(_1$$3, "Cannot find script path: ", path);
ZEPHIR_CALL_METHOD(NULL, _0$$3, "__construct", NULL, 2, _1$$3);
zephir_check_call_status();
zephir_throw_exception_debug(_0$$3, "yb/std.zep", 423 TSRMLS_CC);
ZEPHIR_MM_RESTORE();
return;
}
ZEPHIR_INIT_VAR(_2);
ZVAL_LONG(_2, 4);
ZEPHIR_INIT_VAR(_3);
ZVAL_STRING(_3, "", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_MAKE_REF(data);
ZEPHIR_CALL_FUNCTION(NULL, "extract", NULL, 81, data, _2, _3);
zephir_check_temp_parameter(_3);
ZEPHIR_UNREF(data);
zephir_check_call_status();
if (zephir_require_zval(path TSRMLS_CC) == FAILURE) {
RETURN_MM_NULL();
}
ZEPHIR_MM_RESTORE();
}