本文整理汇总了C++中zephir_array_isset函数的典型用法代码示例。如果您正苦于以下问题:C++ zephir_array_isset函数的具体用法?C++ zephir_array_isset怎么用?C++ zephir_array_isset使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zephir_array_isset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PHP_METHOD
/**
* Check if the current message in the iterator is valid
*/
PHP_METHOD(Phalcon_Validation_Message_Group, valid) {
zval *_0, *_1;
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_messages"), PH_NOISY_CC);
_1 = zephir_fetch_nproperty_this(this_ptr, SL("_position"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, _1));
}
示例2: PHP_METHOD
/**
* Check if the current element in the iterator is valid
*/
PHP_METHOD(Phalcon_Forms_Form, valid) {
zval *_0, *_1;
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_elementsIndexed"), PH_NOISY_CC);
_1 = zephir_fetch_nproperty_this(this_ptr, SL("_position"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, _1));
}
示例3: PHP_METHOD
/**
* Check if the current annotation in the iterator is valid
*/
PHP_METHOD(Phalcon_Annotations_Collection, valid) {
zval *_0, *_1;
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_annotations"), PH_NOISY_CC);
_1 = zephir_fetch_nproperty_this(this_ptr, SL("_position"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, _1));
}
示例4: PHP_METHOD
/**
* Removes an access from a resource
*
* @param array|string accessList
*/
PHP_METHOD(Phalcon_Acl_Adapter_Memory, dropResourceAccess) {
HashTable *_1$$3;
HashPosition _0$$3;
zval *resourceName_param = NULL, *accessList, *accessName = NULL, *accessKey = NULL, **_2$$3, *_3$$4, *_4$$5, *_5$$7, *_6$$8;
zval *resourceName = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &resourceName_param, &accessList);
zephir_get_strval(resourceName, resourceName_param);
if (Z_TYPE_P(accessList) == IS_ARRAY) {
zephir_is_iterable(accessList, &_1$$3, &_0$$3, 0, 0, "phalcon/acl/adapter/memory.zep", 390);
for (
; zephir_hash_get_current_data_ex(_1$$3, (void**) &_2$$3, &_0$$3) == SUCCESS
; zephir_hash_move_forward_ex(_1$$3, &_0$$3)
) {
ZEPHIR_GET_HVALUE(accessName, _2$$3);
ZEPHIR_INIT_NVAR(accessKey);
ZEPHIR_CONCAT_VSV(accessKey, resourceName, "!", accessName);
_3$$4 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
if (zephir_array_isset(_3$$4, accessKey)) {
_4$$5 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
zephir_array_unset(&_4$$5, accessKey, PH_SEPARATE);
}
}
} else {
if (Z_TYPE_P(accessList) == IS_STRING) {
ZEPHIR_INIT_NVAR(accessKey);
ZEPHIR_CONCAT_VSV(accessKey, resourceName, "!", accessName);
_5$$7 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
if (zephir_array_isset(_5$$7, accessKey)) {
_6$$8 = zephir_fetch_nproperty_this(this_ptr, SL("_accessList"), PH_NOISY_CC);
zephir_array_unset(&_6$$8, accessKey, PH_SEPARATE);
}
}
}
ZEPHIR_MM_RESTORE();
}
示例5: PHP_METHOD
PHP_METHOD(Test_IssetTest, testIssetArray1) {
zval *a, *b;
zephir_fetch_params(0, 2, 0, &a, &b);
RETURN_BOOL(zephir_array_isset(a, b));
}
示例6: PHP_METHOD
/**
* The column map is used in the case to get real column name
*/
PHP_METHOD(Phalcon_Validation_Validator_Uniqueness, getColumnNameReal) {
zend_bool _0, _7;
int ZEPHIR_LAST_CALL_STATUS;
zval *field = NULL;
zval *record, *field_param = NULL, *_1, *_6, *_8, *_2$$3 = NULL, *_3$$3 = NULL, *_4$$3, *_5$$3 = NULL, *_9$$4, *_10$$4;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 2, 0, &record, &field_param);
if (unlikely(Z_TYPE_P(field_param) != IS_STRING && Z_TYPE_P(field_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'field' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
if (likely(Z_TYPE_P(field_param) == IS_STRING)) {
zephir_get_strval(field, field_param);
} else {
ZEPHIR_INIT_VAR(field);
ZVAL_EMPTY_STRING(field);
}
_0 = ZEPHIR_GLOBAL(orm).column_renaming;
if (_0) {
_1 = zephir_fetch_nproperty_this(this_ptr, SL("columnMap"), PH_NOISY_CC);
_0 = !zephir_is_true(_1);
}
if (_0) {
ZEPHIR_CALL_METHOD(&_2$$3, record, "getdi", NULL, 0);
zephir_check_call_status();
ZEPHIR_INIT_VAR(_4$$3);
ZVAL_STRING(_4$$3, "modelsMetadata", ZEPHIR_TEMP_PARAM_COPY);
ZEPHIR_CALL_METHOD(&_3$$3, _2$$3, "getshared", NULL, 0, _4$$3);
zephir_check_temp_parameter(_4$$3);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&_5$$3, _3$$3, "getcolumnmap", NULL, 0, record);
zephir_check_call_status();
zephir_update_property_this(this_ptr, SL("columnMap"), _5$$3 TSRMLS_CC);
}
ZEPHIR_OBS_VAR(_6);
zephir_read_property_this(&_6, this_ptr, SL("columnMap"), PH_NOISY_CC);
_7 = Z_TYPE_P(_6) == IS_ARRAY;
if (_7) {
_8 = zephir_fetch_nproperty_this(this_ptr, SL("columnMap"), PH_NOISY_CC);
_7 = zephir_array_isset(_8, field);
}
if (_7) {
_9$$4 = zephir_fetch_nproperty_this(this_ptr, SL("columnMap"), PH_NOISY_CC);
zephir_array_fetch(&_10$$4, _9$$4, field, PH_NOISY | PH_READONLY, "phalcon/validation/validator/uniqueness.zep", 287 TSRMLS_CC);
RETURN_CTOR(_10$$4);
}
RETURN_CTOR(field);
}
示例7: PHP_METHOD
/**
* Validates a value against the class constants.
*
* If value is a valid constant name, returns the corresponding value.
*
* If value is null and a default is set, returns the default value.
*
* @param mixed value
*
* @return mixed
*
* @throws \RuntimeException if value is null and no default exists, or if given an invalid value.
*/
PHP_METHOD(Xpl_Enum, filterValidateValue) {
int ZEPHIR_LAST_CALL_STATUS;
zval *value = NULL, *reflection = NULL, *constants = NULL, *_0, *_2 = NULL, *_1$$6;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 0, 1, &value);
if (!value) {
ZEPHIR_CPY_WRT(value, ZEPHIR_GLOBAL(global_null));
} else {
ZEPHIR_SEPARATE_PARAM(value);
}
ZEPHIR_INIT_VAR(reflection);
object_init_ex(reflection, zephir_get_internal_ce(SS("reflectionclass") TSRMLS_CC));
ZEPHIR_INIT_VAR(_0);
zephir_get_class(_0, this_ptr, 0 TSRMLS_CC);
ZEPHIR_CALL_METHOD(NULL, reflection, "__construct", NULL, 63, _0);
zephir_check_call_status();
ZEPHIR_CALL_METHOD(&constants, reflection, "getconstants", NULL, 100);
zephir_check_call_status();
if (Z_TYPE_P(value) == IS_NULL) {
ZEPHIR_OBS_NVAR(value);
if (zephir_array_isset_string_fetch(&value, constants, SS("_default"), 0 TSRMLS_CC)) {
RETVAL_ZVAL(value, 1, 0);
RETURN_MM();
}
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_RuntimeException, "Missing value: no default exists", "xpl/enum.zep", 177);
return;
}
if (Z_TYPE_P(value) == IS_STRING) {
if (zephir_array_isset(constants, value)) {
zephir_array_fetch(&_1$$6, constants, value, PH_NOISY | PH_READONLY, "xpl/enum.zep", 183 TSRMLS_CC);
ZEPHIR_CPY_WRT(value, _1$$6);
}
if ((zephir_method_exists(this_ptr, value TSRMLS_CC) == SUCCESS)) {
ZEPHIR_RETURN_CALL_METHOD_ZVAL(this_ptr, value, NULL, 0);
zephir_check_call_status();
RETURN_MM();
}
}
ZEPHIR_CALL_FUNCTION(&_2, "in_array", NULL, 2, value, constants, ZEPHIR_GLOBAL(global_true));
zephir_check_call_status();
if (!(zephir_is_true(_2))) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(spl_ce_RuntimeException, "Invalid enum value", "xpl/enum.zep", 193);
return;
}
RETVAL_ZVAL(value, 1, 0);
RETURN_MM();
}
示例8: PHP_METHOD
/**
* Returns an argument in a specific position
*
* @param int|string position
* @return boolean
*/
PHP_METHOD(Phalcon_Annotations_Annotation, hasArgument) {
zval *position, *_0;
zephir_fetch_params(0, 1, 0, &position);
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_arguments"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, position));
}
示例9: PHP_METHOD
/**
* Check if an option exists
*/
PHP_METHOD(Phalcon_Cli_Dispatcher, hasOption) {
zval *option, *_0;
zephir_fetch_params(0, 1, 0, &option);
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_options"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, option));
}
示例10: PHP_METHOD
PHP_METHOD(Test_Unsettest, has) {
zval *key, *_0;
zephir_fetch_params(0, 1, 0, &key);
_0 = zephir_fetch_nproperty_this(this_ptr, SL("property"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, key));
}
示例11: PHP_METHOD
/**
* Check if route exists in collection
*
* @see ArrayAccess
* @param mixed offset
* @return bool
*/
PHP_METHOD(Prr_RouteCollection, offsetExists) {
zval *offset, *_0;
zephir_fetch_params(0, 1, 0, &offset);
_0 = zephir_fetch_nproperty_this(this_ptr, SL("storage"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, offset));
}
示例12: PHP_METHOD
/**
* Check whether a session variable is set in an application context
*
*<code>
* var_dump($session->has('auth'));
*</code>
*/
PHP_METHOD(Phalcon_Session_Adapter, has) {
zval *index_param = NULL, *_SESSION, *uniqueId = NULL, *_0$$3;
zval *index = NULL;
ZEPHIR_MM_GROW();
zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
zephir_fetch_params(1, 1, 0, &index_param);
zephir_get_strval(index, index_param);
uniqueId = zephir_fetch_nproperty_this(this_ptr, SL("_uniqueId"), PH_NOISY_CC);
if (!(ZEPHIR_IS_EMPTY(uniqueId))) {
ZEPHIR_INIT_VAR(_0$$3);
ZEPHIR_CONCAT_VSV(_0$$3, uniqueId, "#", index);
RETURN_MM_BOOL(zephir_array_isset(_SESSION, _0$$3));
}
RETURN_MM_BOOL(zephir_array_isset(_SESSION, index));
}
示例13: PHP_METHOD
/**
* Check if a param exists
*
* @param mixed param
* @return boolean
*/
PHP_METHOD(Phalcon_Dispatcher, hasParam) {
zval *param, *_0;
zephir_fetch_params(0, 1, 0, ¶m);
_0 = zephir_fetch_nproperty_this(this_ptr, SL("_params"), PH_NOISY_CC);
RETURN_BOOL(zephir_array_isset(_0, param));
}
示例14: PHP_METHOD
/**
* Remove an object from the container
*
* @param string offset
* @throws Exception
* @return DiInterface
*/
PHP_METHOD(Pdm_Di_Container, remove) {
zval *offset_param = NULL, *_0, *_1, *_2;
zval *offset = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &offset_param);
if (unlikely(Z_TYPE_P(offset_param) != IS_STRING && Z_TYPE_P(offset_param) != IS_NULL)) {
zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'offset' must be a string") TSRMLS_CC);
RETURN_MM_NULL();
}
if (unlikely(Z_TYPE_P(offset_param) == IS_STRING)) {
offset = offset_param;
} else {
ZEPHIR_INIT_VAR(offset);
ZVAL_EMPTY_STRING(offset);
}
_0 = zephir_fetch_nproperty_this(this_ptr, SL("container"), PH_NOISY_CC);
if (zephir_array_isset(_0, offset)) {
_1 = zephir_fetch_nproperty_this(this_ptr, SL("container"), PH_NOISY_CC);
zephir_array_unset(&_1, offset, PH_SEPARATE);
}
_1 = zephir_fetch_nproperty_this(this_ptr, SL("sharedContainer"), PH_NOISY_CC);
if (zephir_array_isset(_1, offset)) {
_2 = zephir_fetch_nproperty_this(this_ptr, SL("sharedContainer"), PH_NOISY_CC);
zephir_array_unset(&_2, offset, PH_SEPARATE);
}
_1 = zephir_fetch_nproperty_this(this_ptr, SL("paramContainer"), PH_NOISY_CC);
if (zephir_array_isset(_1, offset)) {
_2 = zephir_fetch_nproperty_this(this_ptr, SL("paramContainer"), PH_NOISY_CC);
zephir_array_unset(&_2, offset, PH_SEPARATE);
}
RETURN_THIS();
}
示例15: PHP_METHOD
/**
* Support isset() overloading on PHP 5.1
*
* @param string $name
* @return boolean
*/
PHP_METHOD(Yaf_Session, __isset) {
zval *name_param = NULL, *_0, *_1, *_SESSION;
zval *name = NULL;
ZEPHIR_MM_GROW();
zephir_fetch_params(1, 1, 0, &name_param);
zephir_get_strval(name, name_param);
ZEPHIR_INIT_VAR(_0);
_1 = zephir_fetch_nproperty_this(this_ptr, SL("session"), PH_NOISY_CC);
if (zephir_array_isset(_1, name)) {
ZVAL_BOOL(_0, 1);
} else {
zephir_get_global(&_SESSION, SS("_SESSION") TSRMLS_CC);
ZVAL_BOOL(_0, zephir_array_isset(_SESSION, name));
}
RETURN_CCTOR(_0);
}