Lines Matching refs:fetch
620 zend_class_entry *ce = stmt->fetch.cls.ce; in do_fetch_class_prepare()
621 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
622 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
627 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
633 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
637 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
642 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
678 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
679 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
681 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
684 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
693 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
694 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
696 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
698 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
700 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
703 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
704 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
705 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
706 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
707 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
709 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
710 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
711 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
741 if ((flags & PDO_FETCH_GROUP) && stmt->fetch.column == -1) { in do_fetch()
744 colno = stmt->fetch.column; in do_fetch()
794 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
815 old_ce = stmt->fetch.cls.ce; in do_fetch()
816 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
817 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
826 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
828 stmt->fetch.cls.ce = cep; in do_fetch()
835 ce = stmt->fetch.cls.ce; in do_fetch()
846 if (!stmt->fetch.cls.fci.size) { in do_fetch()
853 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
854 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
855 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
860 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
861 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
862 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
871 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
878 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
887 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
892 if (!stmt->fetch.func.fci.size) { in do_fetch()
903 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1019 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1020 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1033 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1034 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1035 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1040 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1041 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1047 stmt->fetch.cls.ce = old_ce; in do_fetch()
1048 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1049 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1054 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1055 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1056 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1069 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1152 PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1196 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1197 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1198 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1203 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(Z_ARRVAL_P(ctor_args))); in PHP_METHOD()
1205 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1208 stmt->fetch.cls.ce = ce; in PHP_METHOD()
1210 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1219 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1220 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1221 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1270 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1271 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1272 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1286 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1287 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1292 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1296 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1298 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1318 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1343 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1345 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1394 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1395 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1396 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1710 if (!Z_ISUNDEF(stmt->fetch.into)) { in pdo_stmt_setup_fetch_mode()
1711 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1712 ZVAL_UNDEF(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1762 stmt->fetch.column = Z_LVAL(args[0]); in pdo_stmt_setup_fetch_mode()
1768 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1778 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1817 stmt->fetch.cls.ce = cep; in pdo_stmt_setup_fetch_mode()
1821 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(constructor_args)); in pdo_stmt_setup_fetch_mode()
1841 ZVAL_COPY(&stmt->fetch.into, &args[0]); in pdo_stmt_setup_fetch_mode()
2082 *gc_data = &stmt->fetch.into; in dbstmt_get_gc()
2129 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2130 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2131 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()