Lines Matching refs:fetch

615 	zend_class_entry *ce = stmt->fetch.cls.ce;  in do_fetch_class_prepare()
616 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
617 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
622 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
628 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
632 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
637 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
673 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
674 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
676 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
679 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
688 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
689 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
691 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
693 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
695 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
698 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
699 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
700 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
701 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
702 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
704 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
705 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
706 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
736 if ((flags & PDO_FETCH_GROUP) && stmt->fetch.column == -1) { in do_fetch()
739 colno = stmt->fetch.column; in do_fetch()
784 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
805 old_ce = stmt->fetch.cls.ce; in do_fetch()
806 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
807 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
816 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
818 stmt->fetch.cls.ce = cep; in do_fetch()
825 ce = stmt->fetch.cls.ce; in do_fetch()
836 if (!stmt->fetch.cls.fci.size) { in do_fetch()
843 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
844 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
845 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
850 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
851 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
852 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
861 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
868 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
877 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
882 if (!stmt->fetch.func.fci.size) { in do_fetch()
893 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1009 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1010 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1023 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1024 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1025 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1030 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1031 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1037 stmt->fetch.cls.ce = old_ce; in do_fetch()
1038 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1039 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1044 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1045 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1046 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1059 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1142 PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1186 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1187 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1188 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1193 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(Z_ARRVAL_P(ctor_args))); in PHP_METHOD()
1195 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1198 stmt->fetch.cls.ce = ce; in PHP_METHOD()
1200 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1209 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1210 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1211 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1260 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1261 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1262 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1276 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1277 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1282 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1286 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1288 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1308 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1333 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1335 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1384 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1385 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1386 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1700 if (!Z_ISUNDEF(stmt->fetch.into)) { in pdo_stmt_setup_fetch_mode()
1701 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1702 ZVAL_UNDEF(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1752 stmt->fetch.column = Z_LVAL(args[0]); in pdo_stmt_setup_fetch_mode()
1758 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1768 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1807 stmt->fetch.cls.ce = cep; in pdo_stmt_setup_fetch_mode()
1811 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(constructor_args)); in pdo_stmt_setup_fetch_mode()
1831 ZVAL_COPY(&stmt->fetch.into, &args[0]); in pdo_stmt_setup_fetch_mode()
2072 *gc_data = &stmt->fetch.into; in dbstmt_get_gc()
2119 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2120 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2121 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()