这篇教程C++ zend_hash_exists函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中zend_hash_exists函数的典型用法代码示例。如果您正苦于以下问题:C++ zend_hash_exists函数的具体用法?C++ zend_hash_exists怎么用?C++ zend_hash_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了zend_hash_exists函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: hasWordpressint hasWordpress(TSRMLS_D){ if(zend_hash_exists(EG(class_table), "wp", sizeof("wp")) && zend_hash_exists(EG(class_table), "wp_query", sizeof("wp_query")) ) { return 1; } return 0;}
开发者ID:BoundaryDev,项目名称:graphdat-sdk-php,代码行数:9,
示例2: hasMagentoint hasMagento(TSRMLS_D){ if(zend_hash_exists(EG(class_table), "mage", sizeof("mage")) && zend_hash_exists(EG(class_table), "mage_core_controller_varien_action", sizeof("mage_core_controller_varien_action")) ) { return 1; } return 0;}
开发者ID:BoundaryDev,项目名称:graphdat-sdk-php,代码行数:9,
示例3: hasYiiint hasYii(TSRMLS_D){ if(zend_hash_exists(EG(class_table), "chttprequest", sizeof("chttprequest")) && zend_hash_exists(EG(class_table), "capplication", sizeof("capplication")) && zend_hash_exists(EG(class_table), "yiibase", sizeof("yiibase")) ) { return 1; } return 0;}
开发者ID:jcsmesquita,项目名称:graphdat-sdk-php,代码行数:10,
示例4: MYSQLND_METHOD/* {{{ mysqlnd_res_meta::func_leave */static enum_func_statusMYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int line, const char * const file){ char *func_name;#ifdef MYSQLND_THREADED MYSQLND_ZTS(self);#endif if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) { return PASS; }#ifdef MYSQLND_THREADED if (MYSQLND_G(thread_id) != tsrm_thread_id()) { return PASS; /* don't trace background threads */ }#endif if (zend_stack_count(&self->call_stack) >= self->nest_level_limit) { return PASS; } zend_stack_top(&self->call_stack, (void **)&func_name); if (func_name[0] == '/0') { ; /* don't log that function */ } else if (!zend_hash_num_elements(&self->not_filtered_functions) || 1 == zend_hash_exists(&self->not_filtered_functions, func_name, strlen(func_name) + 1)) { self->m->log_va(self, line, file, zend_stack_count(&self->call_stack) - 1, NULL, "<%s", func_name); } return zend_stack_del_top(&self->call_stack) == SUCCESS? PASS:FAIL;}
开发者ID:browniebraun,项目名称:php-src,代码行数:33,
示例5: object_common2static inline int object_common2(UNSERIALIZE_PARAMETER, long elements){ zval *retval_ptr = NULL; zval fname; if (Z_TYPE_PP(rval) != IS_OBJECT) { return 0; } if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements, 1)) { return 0; } if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY && zend_hash_exists(&Z_OBJCE_PP(rval)->function_table, "__wakeup", sizeof("__wakeup"))) { INIT_PZVAL(&fname); ZVAL_STRINGL(&fname, "__wakeup", sizeof("__wakeup") - 1, 0); UNSERIALIZE2_G(serialize_lock)++; call_user_function_ex(CG(function_table), rval, &fname, &retval_ptr, 0, 0, 1, NULL TSRMLS_CC); UNSERIALIZE2_G(serialize_lock)--; } if (retval_ptr) { zval_ptr_dtor(&retval_ptr); } if (EG(exception)) { return 0; } return finish_nested_data(UNSERIALIZE_PASSTHRU);}
开发者ID:qiaolun,项目名称:unserialize,代码行数:33,
示例6: PHP_METHOD/* {{{ proto void ProtocolBuffersDescriptorBuilder::addValue(ProtocolBuffers/EnumValueDescriptor $value[, bool $force = false])*/PHP_METHOD(protocolbuffers_enum_descriptor_builder, addValue){ zval *instance = getThis(); zval *value, **fields, *name; zend_bool force = 0; char *property; int property_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &value, php_protocol_buffers_enum_value_descriptor_class_entry, &force) == FAILURE) { return; } zend_mangle_property_name(&property, &property_len, (char*)"*", 1, (char*)ZEND_STRS("values"), 0); if (zend_hash_find(Z_OBJPROP_P(instance), property, property_len, (void **)&fields) == SUCCESS) { if (php_protocolbuffers_read_protected_property(value, ZEND_STRS("name"), &name TSRMLS_CC)) { if (zend_hash_exists(Z_ARRVAL_PP(fields), Z_STRVAL_P(name), Z_STRLEN_P(name))) { if (force < 1) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "name `%s` has already registered.", Z_STRVAL_P(name)); } efree(property); return; } } Z_ADDREF_P(value); zend_hash_update(Z_ARRVAL_PP(fields), Z_STRVAL_P(name), Z_STRLEN_P(name)+1, &value, sizeof(zval), NULL); } efree(property);}
开发者ID:Easthy,项目名称:php-protocolbuffers,代码行数:33,
示例7: phalcon_array_isset/** * Check if index exists on an array zval */int phalcon_array_isset(const zval *arr, zval *index){ zval *copy; if (Z_TYPE_P(arr) != IS_ARRAY) { return 0; } if (Z_TYPE_P(index) == IS_NULL) { ALLOC_ZVAL(copy); ZVAL_ZVAL(copy, index, 1, 0); convert_to_string(copy); index = copy; } else { if (Z_TYPE_P(index) == IS_BOOL || Z_TYPE_P(index) == IS_DOUBLE) { ALLOC_ZVAL(copy); ZVAL_ZVAL(copy, index, 1, 0); convert_to_long(copy); index = copy; } } if (Z_TYPE_P(index) == IS_STRING) { return zend_hash_exists(Z_ARRVAL_P(arr), Z_STRVAL_P(index), Z_STRLEN_P(index)+1); } else { return zend_hash_index_exists(Z_ARRVAL_P(arr), Z_LVAL_P(index)); } return 0;}
开发者ID:fatihzkaratana,项目名称:cphalcon,代码行数:33,
示例8: PHP_METHOD/* {{{ proto void ProtocolBuffersDescriptorBuilder::addValue(ProtocolBuffers/EnumValueDescriptor $value[, bool $force = false])*/PHP_METHOD(protocolbuffers_enum_descriptor_builder, addValue){ zval *instance = getThis(); zval *value, *fields, *name; zend_bool force = 0;// char *property; int property_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &value, php_protocol_buffers_enum_value_descriptor_class_entry, &force) == FAILURE) { return; } zend_string *property_key = zend_mangle_property_name((char*)"*", 1, (char*)ZEND_STRL("values"), 0); if ((fields=zend_hash_find(Z_OBJPROP_P(instance), property_key)) != NULL) { if (php_protocolbuffers_read_protected_property(value, ZEND_STRL("name"), &name TSRMLS_CC)) { zend_string *name_key = zend_string_init(Z_STRVAL_P(name), Z_STRLEN_P(name),0); if (zend_hash_exists(Z_ARRVAL_P(fields), name_key)) { if (force < 1) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "name `%s` has already registered.", Z_STRVAL_P(name)); } zend_string_release(property_key); zend_string_release(name_key); return; } } Z_ADDREF_P(value); zend_string *name_key = zend_string_init(Z_STRVAL_P(name), Z_STRLEN_P(name)+1,0); zend_hash_update(Z_ARRVAL_P(fields), name_key, value); zend_string_release(name_key); } zend_string_release(property_key);}
开发者ID:henryzxj,项目名称:php-protocolbuffers,代码行数:37,
示例9: php_runkit_sandbox_parent_unset_property/* {{{ php_runkit_sandbox_parent_unset_property unset_property handler */static void php_runkit_sandbox_parent_unset_property(zval *object, zval *member , const zend_literal *key){ php_runkit_sandbox_parent_object *objval = PHP_RUNKIT_SANDBOX_PARENT_FETCHBOX(object); zval member_copy; if (!objval) { return; } if (!objval->self->parent_access || !objval->self->parent_write) { php_error_docref(NULL, E_WARNING, "Access to modify parent's symbol table is disallowed"); return; } PHP_RUNKIT_ZVAL_CONVERT_TO_STRING_IF_NEEDED(member, member_copy); PHP_RUNKIT_SANDBOX_PARENT_BEGIN(objval) if (zend_hash_exists(php_runkit_sandbox_parent_resolve_symbol_table(objval), Z_STRVAL_P(member), Z_STRLEN_P(member) + 1)) { /* Simply removing the zval* causes weirdness with CVs */ zend_hash_update(php_runkit_sandbox_parent_resolve_symbol_table(objval), Z_STRVAL_P(member), Z_STRLEN_P(member) + 1, (void*)&EG(uninitialized_zval_ptr), sizeof(zval*), NULL); } PHP_RUNKIT_SANDBOX_PARENT_END(objval) if (member == &member_copy) { zval_dtor(member); }}
开发者ID:TysonAndre,项目名称:runkit7,代码行数:29,
示例10: phalcon_call_method_normal/** * This function implements a secure old-style way to call functions */static inline int phalcon_call_method_normal(zval *return_value, zval *object, char *method_name, int method_len, int check, int noreturn TSRMLS_DC){ zval *fn = NULL; int status = FAILURE; zend_class_entry *ce, *active_scope = NULL; if (Z_TYPE_P(object) != IS_OBJECT) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Call to method %s() on a non object", method_name); phalcon_memory_restore_stack(TSRMLS_C); return FAILURE; } ce = Z_OBJCE_P(object); if (check) { if (!zend_hash_exists(&ce->function_table, method_name, method_len+1)) { return SUCCESS; } } if (!noreturn) { ALLOC_INIT_ZVAL(return_value); } PHALCON_ALLOC_ZVAL(fn); ZVAL_STRINGL(fn, method_name, method_len, 0); active_scope = EG(scope); /* Find class_entry scope */ if (ce->parent) { phalcon_find_scope(ce, method_name, method_len TSRMLS_CC); } else { EG(scope) = ce; } status = phalcon_call_user_function(&ce->function_table, &object, fn, return_value, 0, NULL TSRMLS_CC); if (status == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Call to undefined method %s()", method_name); } EG(scope) = active_scope; ZVAL_NULL(fn); zval_ptr_dtor(&fn); if (!noreturn) { zval_ptr_dtor(&return_value); } if (EG(exception)) { status = FAILURE; } if (status == FAILURE) { phalcon_memory_restore_stack(TSRMLS_C); } return status;}
开发者ID:Tigerlee1987,项目名称:cphalcon,代码行数:62,
示例11: spl_autoloadstatic int spl_autoload(zend_string *class_name, zend_string *lc_name, const char *ext, int ext_len) /* {{{ */{ char *class_file; int class_file_len; zval dummy; zend_file_handle file_handle; zend_op_array *new_op_array; zval result; int ret; class_file_len = (int)spprintf(&class_file, 0, "%s%.*s", ZSTR_VAL(lc_name), ext_len, ext);#if DEFAULT_SLASH != '//' { char *ptr = class_file; char *end = ptr + class_file_len; while ((ptr = memchr(ptr, '//', (end - ptr))) != NULL) { *ptr = DEFAULT_SLASH; } }#endif ret = php_stream_open_for_zend_ex(class_file, &file_handle, USE_PATH|STREAM_OPEN_FOR_INCLUDE); if (ret == SUCCESS) { zend_string *opened_path; if (!file_handle.opened_path) { file_handle.opened_path = zend_string_init(class_file, class_file_len, 0); } opened_path = zend_string_copy(file_handle.opened_path); ZVAL_NULL(&dummy); if (zend_hash_add(&EG(included_files), opened_path, &dummy)) { new_op_array = zend_compile_file(&file_handle, ZEND_REQUIRE); zend_destroy_file_handle(&file_handle); } else { new_op_array = NULL; zend_file_handle_dtor(&file_handle); } zend_string_release(opened_path); if (new_op_array) { ZVAL_UNDEF(&result); zend_execute(new_op_array, &result); destroy_op_array(new_op_array); efree(new_op_array); if (!EG(exception)) { zval_ptr_dtor(&result); } efree(class_file); return zend_hash_exists(EG(class_table), lc_name); } } efree(class_file); return 0;} /* }}} */
开发者ID:morafabio,项目名称:php-src,代码行数:57,
示例12: vector_write_propertystatic void vector_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */{ zval tmp; if (zend_hash_exists(&Z_OBJCE_P(object)->properties_info, Z_STR_P(member))) { ZVAL_DOUBLE(&tmp, zval_get_double(value)); zend_get_std_object_handlers()->write_property(object, member, &tmp, cache_slot); }}
开发者ID:lt,项目名称:php-vector-ext,代码行数:9,
示例13: PHP_METHOD/** * override __call() * it require two parameters, func_name and args **/PHP_METHOD(McpackHessianClient, __call) { zend_class_entry *ce; zval *p_this, *args, *params, *result, *method, *tmp; char *func_name, *ret_str = NULL; int func_name_len = 0; size_t return_len = 0, max_len = 1024 * 1024 * 1024; p_this = getThis(); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, p_this, "Osz", &ce, mcphessian_ce_ptr, &func_name, &func_name_len, &args) == FAILURE) { php_error(E_WARNING, "parse parameters error."); RETURN_NULL(); } // init params MAKE_STD_ZVAL(params); array_init(params); add_assoc_string(params, "jsonrpc", "2.0", 0); add_assoc_string(params, "method", func_name, 0); add_assoc_zval(params, "params", args); add_assoc_string(params, "id", "123456", 0); zval *pack = array2mcpack(params); // post data zval *z_url = zend_read_property(mcphessian_ce_ptr, p_this, ZEND_STRL("url"), 1 TSRMLS_CC); convert_to_string(z_url); char *url = Z_STRVAL_P(z_url); php_stream_context *context = php_stream_context_alloc(); MAKE_STD_ZVAL(method); ZVAL_STRING(method, "POST", 0); php_stream_context_set_option(context, "http", "method", method); php_stream_context_set_option(context, "http", "content", pack); // read data from stream php_stream *stream = php_stream_open_wrapper_ex(url, "rb", REPORT_ERRORS, NULL, context); if (stream) { ret_str = php_stream_get_line(stream, NULL, max_len, &return_len); } else { php_error(E_WARNING, "failed to open stream %s.", url); RETURN_NULL(); } MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, ret_str, return_len, 0); result = mcpack2array(tmp); php_stream_close(stream); efree(ret_str); // get result from array zval **ret_val; if (zend_hash_exists(Z_ARRVAL_P(result), "result", 7)) { zend_hash_find(Z_ARRVAL_P(result), "result", 7, (void **)&ret_val); RETURN_ZVAL(*ret_val, 1, 0); } else { php_error(E_WARNING, "return value illegal."); RETURN_NULL(); }}
开发者ID:Raaaay,项目名称:mcphessian,代码行数:61,
示例14: phalcon_array_isset_string/** * Check if char index exists on an array zval */int PHALCON_FASTCALL phalcon_array_isset_string(const zval *arr, char *index, uint index_length){ if (Z_TYPE_P(arr) != IS_ARRAY) { return 0; } else { if (!zend_hash_num_elements(Z_ARRVAL_P(arr))) { return 0; } } return zend_hash_exists(Z_ARRVAL_P(arr), index, index_length);}
开发者ID:Tigerlee1987,项目名称:cphalcon,代码行数:13,
示例15: zend_ts_hash_existsZEND_API int zend_ts_hash_exists(TsHashTable *ht, zend_string *key){ int retval; begin_read(ht); retval = zend_hash_exists(TS_HASH(ht), key); end_read(ht); return retval;}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,
示例16: PHP_METHODPHP_METHOD(jz_data, __isset) { zend_string *name; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { return; } else { zval *prop = zend_read_property(jz_data_class_entry, getThis(), ZEND_STRL(JZ_DATA_PROPERT_NAME), 1, NULL); RETURN_BOOL(zend_hash_exists(Z_ARRVAL_P(prop), name)); }}
开发者ID:jonnywang,项目名称:jz,代码行数:10,
示例17: PHP_METHOD/** {{{ proto public Yaf_Config_Simple::__isset($name)*/PHP_METHOD(yaf_config_simple, __isset) { zend_string *name; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { return; } else { zval *prop = zend_read_property(yaf_config_simple_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1, NULL); RETURN_BOOL(zend_hash_exists(Z_ARRVAL_P(prop), name)); }}
开发者ID:cchtw,项目名称:yaf,代码行数:12,
示例18: qb_validate_operands_fetch_constantstatic int32_t qb_validate_operands_fetch_constant(qb_compiler_context *cxt, qb_op_factory *f, qb_primitive_type expr_type, uint32_t flags, qb_operand *operands, uint32_t operand_count, qb_result_destination *result_destination) { USE_TSRM qb_operand *scope = &operands[0], *name = &operands[1]; if(scope->type == QB_OPERAND_ZEND_STATIC_CLASS) { // validation at runtime } else { zend_class_entry *ce = NULL; HashTable *ht; const char *name_str = Z_STRVAL_P(name->constant); uint32_t name_len = Z_STRLEN_P(name->constant); if(scope->type == QB_OPERAND_ZEND_CLASS) { ce = scope->zend_class; } else if(scope->type == QB_OPERAND_ZVAL) { if(Z_TYPE_P(scope->constant) == IS_STRING) { ce = zend_fetch_class_by_name(Z_STRVAL_P(scope->constant), Z_STRLEN_P(scope->constant), NULL, 0 TSRMLS_CC); } else { ce = cxt->zend_op_array->scope; } } if(ce) { ht = &ce->constants_table; } else { ht = EG(zend_constants); } if(zend_hash_exists(ht, name_str, name_len + 1)) { return TRUE; } // see if the name has a namespace attached if(qb_strip_namespace(&name_str, &name_len)) { if(zend_hash_exists(ht, name_str, name_len + 1)) { return TRUE; } } // see if it's a special QB constant if(qb_get_special_constant(cxt, name_str, name_len)) { return TRUE; } else { qb_report_undefined_constant_exception(cxt->line_id, ce, Z_STRVAL_P(name->constant)); } } return FALSE;}
开发者ID:3CTO,项目名称:qb,代码行数:42,
示例19: PHP_METHOD/* {{{ proto bool MongoDBRef::isRef(mixed ref) Checks if $ref has a $ref and $id property/key */PHP_METHOD(MongoDBRef, isRef){ zval *ref; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &ref) == FAILURE) { return; } if (IS_SCALAR_P(ref)) { RETURN_FALSE; } /* check that $ref and $id fields exists */ if (zend_hash_exists(HASH_P(ref), "$ref", strlen("$ref") + 1) && zend_hash_exists(HASH_P(ref), "$id", strlen("$id") + 1)) { /* good enough */ RETURN_TRUE; } RETURN_FALSE;}
开发者ID:BumBliss,项目名称:mongo-php-driver,代码行数:22,
示例20: phalcon_array_isset/** * Check if index exists on an array zval */int PHALCON_FASTCALL phalcon_array_isset(const zval *arr, zval *index) { zval *copy; int exists, type, copied = 0; if (Z_TYPE_P(arr) != IS_ARRAY) { return 0; } else { if (!zend_hash_num_elements(Z_ARRVAL_P(arr))) { return 0; } } if (Z_TYPE_P(index) == IS_NULL) { ALLOC_INIT_ZVAL(copy); ZVAL_ZVAL(copy, index, 1, 0); convert_to_string(copy); index = copy; copied = 1; } else { if (Z_TYPE_P(index) == IS_BOOL || Z_TYPE_P(index) == IS_DOUBLE) { ALLOC_INIT_ZVAL(copy); ZVAL_ZVAL(copy, index, 0, 0); convert_to_long(copy); index = copy; copied = 1; } } if (Z_TYPE_P(index) == IS_STRING) { if((type = is_numeric_string(Z_STRVAL_P(index), Z_STRLEN_P(index), NULL, NULL, 0))){ if (type == IS_LONG) { ALLOC_INIT_ZVAL(copy); ZVAL_ZVAL(copy, index, 1, 0); convert_to_long(copy); index = copy; copied = 1; } } } if (Z_TYPE_P(index) == IS_STRING) { exists = zend_hash_exists(Z_ARRVAL_P(arr), Z_STRVAL_P(index), Z_STRLEN_P(index) + 1); } else { exists = zend_hash_index_exists(Z_ARRVAL_P(arr), Z_LVAL_P(index)); } if (copied) { zval_ptr_dtor(©); } return exists;}
开发者ID:BlueShark,项目名称:cphalcon,代码行数:56,
示例21: phalcon_call_method_params_normal/** * Call methods that require parameters in a old-style secure way */inline int phalcon_call_method_params_normal(zval *return_value, zval *object, char *method_name, int method_len, zend_uint param_count, zval *params[], int check, int noreturn TSRMLS_DC){ zval *fn = NULL; int status = FAILURE; zend_class_entry *ce, *active_scope = NULL; if (check) { if (!zend_hash_exists(&Z_OBJCE_P(object)->function_table, method_name, method_len+1)) { return SUCCESS; } } if (!noreturn) { ALLOC_INIT_ZVAL(return_value); } PHALCON_ALLOC_ZVAL(fn); ZVAL_STRINGL(fn, method_name, method_len, 1); if (Z_TYPE_P(object) == IS_OBJECT) { active_scope = EG(scope); ce = Z_OBJCE_P(object); phalcon_find_scope(ce, method_name, method_len TSRMLS_CC); status = PHALCON_CALL_USER_FUNCTION(&ce->function_table, &object, fn, return_value, param_count, params TSRMLS_CC); if (status == FAILURE) { EG(scope) = active_scope; php_error_docref(NULL TSRMLS_CC, E_ERROR, "Call to undefined method %s() on class %s", Z_STRVAL_P(fn), Z_OBJCE_P(object)->name); status = FAILURE; } EG(scope) = active_scope; } else { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Call to method %s() on a non object", Z_STRVAL_P(fn)); status = FAILURE; } zval_ptr_dtor(&fn); if (!noreturn) { zval_ptr_dtor(&return_value); return_value = NULL; } if (EG(exception)){ status = FAILURE; } if (status == FAILURE) { phalcon_memory_restore_stack(TSRMLS_C); } return status;}
开发者ID:gplanchat,项目名称:cphalcon,代码行数:55,
示例22: _zend_hash_add_or_updateZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) { if (nKeyLength <= 0) { return FAILURE; } assert(arKey[nKeyLength - 1] == '/0'); if ((flag & HASH_ADD) && zend_hash_exists(ht, arKey, nKeyLength)) { return FAILURE; } HPHP::String key(arKey, nKeyLength - 1, HPHP::CopyString); ht->zSet(key.get(), (*(zval**)pData)); return SUCCESS;}
开发者ID:Yermo,项目名称:hhvm,代码行数:13,
示例23: TSRMLS_FETCH/** * Execute a file only once * @return Value */Value File::once() { // skip if the path is invalid if (!_path) return nullptr; // we need the tsrm_ls variable (@todo would it be better if this was a member?) TSRMLS_FETCH(); // check if this file was already included if (zend_hash_exists(&EG(included_files), _path, ::strlen(_path) + 1)) return nullptr; // execute the file return execute();}
开发者ID:Alex-duzhichao,项目名称:PHP-CPP-LEGACY,代码行数:18,
示例24: pError// time criticalbool PHPQt::methodExists(const zend_class_entry* ce_ptr, const char* methodname){ if(ce_ptr == NULL) pError() << "no class entry, could not check for message " << methodname; char* lcname = zend_str_tolower_dup(methodname, strlen(methodname)); if(zend_hash_exists(const_cast<HashTable*>(&ce_ptr->function_table), lcname, strlen(methodname)+1)){ return true; } efree(lcname); return false;}
开发者ID:0xd34df00d,项目名称:Qross,代码行数:15,
示例25: phalcon_find_scope/** * Finds the correct scope to execute the function */int phalcon_find_scope(zend_class_entry *ce, char *method_name, int method_len TSRMLS_DC){ char *lcname = zend_str_tolower_dup(method_name, method_len); while (ce) { if (zend_hash_exists(&ce->function_table, lcname, method_len+1)) { EG(scope) = ce; efree(lcname); return SUCCESS; } ce = ce->parent; } if (lcname) { efree(lcname); } return FAILURE;}
开发者ID:gplanchat,项目名称:cphalcon,代码行数:18,
注:本文中的zend_hash_exists函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ zend_hash_find函数代码示例 C++ zend_hash_destroy函数代码示例 |