Lines Matching refs:callable

3012 static zend_always_inline int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca…  in zend_is_callable_check_func()  argument
3034 if (UNEXPECTED(Z_STRVAL_P(callable)[0] == '\\')) { in zend_is_callable_check_func()
3036 ZSTR_ALLOCA_ALLOC(lmname, Z_STRLEN_P(callable) - 1, use_heap); in zend_is_callable_check_func()
3037 zend_str_tolower_copy(ZSTR_VAL(lmname), Z_STRVAL_P(callable) + 1, Z_STRLEN_P(callable) - 1); in zend_is_callable_check_func()
3041 lmname = Z_STR_P(callable); in zend_is_callable_check_func()
3044 ZSTR_ALLOCA_ALLOC(lmname, Z_STRLEN_P(callable), use_heap); in zend_is_callable_check_func()
3045 zend_str_tolower_copy(ZSTR_VAL(lmname), Z_STRVAL_P(callable), Z_STRLEN_P(callable)); in zend_is_callable_check_func()
3057 if ((colon = zend_memrchr(Z_STRVAL_P(callable), ':', Z_STRLEN_P(callable))) != NULL && in zend_is_callable_check_func()
3058 colon > Z_STRVAL_P(callable) && in zend_is_callable_check_func()
3064 clen = colon - Z_STRVAL_P(callable); in zend_is_callable_check_func()
3065 mlen = Z_STRLEN_P(callable) - clen - 2; in zend_is_callable_check_func()
3067 if (colon == Z_STRVAL_P(callable)) { in zend_is_callable_check_func()
3080 cname = zend_string_init(Z_STRVAL_P(callable), clen, 0); in zend_is_callable_check_func()
3092 mname = zend_string_init(Z_STRVAL_P(callable) + clen + 2, mlen, 0); in zend_is_callable_check_func()
3095 mname = Z_STR_P(callable); in zend_is_callable_check_func()
3102 … zend_spprintf(error, 0, "function '%s' not found or invalid function name", Z_STRVAL_P(callable)); in zend_is_callable_check_func()
3275 ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object) /* {{{ */ in zend_get_callable_name_ex() argument
3278 switch (Z_TYPE_P(callable)) { in zend_get_callable_name_ex()
3281 return zend_create_method_string(object->ce->name, Z_STR_P(callable)); in zend_get_callable_name_ex()
3283 return zend_string_copy(Z_STR_P(callable)); in zend_get_callable_name_ex()
3290 if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) { in zend_get_callable_name_ex()
3291 obj = zend_hash_index_find_deref(Z_ARRVAL_P(callable), 0); in zend_get_callable_name_ex()
3292 method = zend_hash_index_find_deref(Z_ARRVAL_P(callable), 1); in zend_get_callable_name_ex()
3312 if (Z_OBJ_HANDLER_P(callable, get_closure) in zend_get_callable_name_ex()
3313 … && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &calling_scope, &fptr, &object) == SUCCESS) { in zend_get_callable_name_ex()
3314 zend_class_entry *ce = Z_OBJCE_P(callable); in zend_get_callable_name_ex()
3321 return zval_get_string(callable); in zend_get_callable_name_ex()
3324 callable = Z_REFVAL_P(callable); in zend_get_callable_name_ex()
3327 return zval_get_string_func(callable); in zend_get_callable_name_ex()
3332 ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */ in zend_get_callable_name() argument
3334 return zend_get_callable_name_ex(callable, NULL); in zend_get_callable_name()
3338 static zend_always_inline zend_bool zend_is_callable_impl(zval *callable, zend_object *object, uint… in zend_is_callable_impl() argument
3357 switch (Z_TYPE_P(callable)) { in zend_is_callable_impl()
3370 ret = zend_is_callable_check_func(check_flags, callable, fcc, strict_class, error); in zend_is_callable_impl()
3381 if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) { in zend_is_callable_impl()
3382 obj = zend_hash_index_find(Z_ARRVAL_P(callable), 0); in zend_is_callable_impl()
3383 method = zend_hash_index_find(Z_ARRVAL_P(callable), 1); in zend_is_callable_impl()
3420 callable = method; in zend_is_callable_impl()
3424 if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) { in zend_is_callable_impl()
3438 if (Z_OBJ_HANDLER_P(callable, get_closure)) { in zend_is_callable_impl()
3439 …if (Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, … in zend_is_callable_impl()
3453 callable = Z_REFVAL_P(callable); in zend_is_callable_impl()
3462 ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, z… in zend_is_callable_ex() argument
3464 zend_bool ret = zend_is_callable_impl(callable, object, check_flags, fcc, error); in zend_is_callable_ex()
3466 *callable_name = zend_get_callable_name_ex(callable, object); in zend_is_callable_ex()
3471 ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_na… in zend_is_callable() argument
3473 return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL); in zend_is_callable()
3477 ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */ in zend_make_callable() argument
3481 if (zend_is_callable_ex(callable, NULL, IS_CALLABLE_STRICT, callable_name, &fcc, NULL)) { in zend_make_callable()
3482 if (Z_TYPE_P(callable) == IS_STRING && fcc.calling_scope) { in zend_make_callable()
3483 zval_ptr_dtor_str(callable); in zend_make_callable()
3484 array_init(callable); in zend_make_callable()
3485 add_next_index_str(callable, zend_string_copy(fcc.calling_scope->name)); in zend_make_callable()
3486 add_next_index_str(callable, zend_string_copy(fcc.function_handler->common.function_name)); in zend_make_callable()
3495 ZEND_API int zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_… in zend_fcall_info_init() argument
3497 if (!zend_is_callable_ex(callable, NULL, check_flags, callable_name, fcc, error)) { in zend_fcall_info_init()
3503 ZVAL_COPY_VALUE(&fci->function_name, callable); in zend_fcall_info_init()