Lines Matching refs:fetch
690 zend_class_entry *ce = stmt->fetch.cls.ce; in do_fetch_class_prepare()
691 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
692 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
697 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
703 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
707 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
712 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
748 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
749 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
751 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
754 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
763 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
764 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
766 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
768 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
770 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
773 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
774 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
775 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
776 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
777 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
779 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
780 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
781 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
811 if ((flags & PDO_FETCH_GROUP) && stmt->fetch.column == -1) { in do_fetch()
814 colno = stmt->fetch.column; in do_fetch()
864 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
885 old_ce = stmt->fetch.cls.ce; in do_fetch()
886 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
887 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
896 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
898 stmt->fetch.cls.ce = cep; in do_fetch()
905 ce = stmt->fetch.cls.ce; in do_fetch()
916 if (!stmt->fetch.cls.fci.size) { in do_fetch()
923 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
924 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
925 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
930 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
931 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
932 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
941 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
948 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
957 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
962 if (!stmt->fetch.func.fci.size) { in do_fetch()
973 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1089 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1090 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1103 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1104 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1105 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1110 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1111 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1117 stmt->fetch.cls.ce = old_ce; in do_fetch()
1118 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1119 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1124 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1125 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1126 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1139 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1219 PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1263 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1264 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1265 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1270 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(Z_ARRVAL_P(ctor_args))); in PHP_METHOD()
1272 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1275 stmt->fetch.cls.ce = ce; in PHP_METHOD()
1277 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1286 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1287 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1288 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1337 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1338 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1339 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1353 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1354 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1359 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1363 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1365 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1385 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1410 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1412 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1461 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1462 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1463 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1781 if (!Z_ISUNDEF(stmt->fetch.into)) { in pdo_stmt_setup_fetch_mode()
1782 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1783 ZVAL_UNDEF(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1833 stmt->fetch.column = Z_LVAL(args[0]); in pdo_stmt_setup_fetch_mode()
1839 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1849 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1888 stmt->fetch.cls.ce = cep; in pdo_stmt_setup_fetch_mode()
1892 ZVAL_ARR(&stmt->fetch.cls.ctor_args, zend_array_dup(constructor_args)); in pdo_stmt_setup_fetch_mode()
1912 ZVAL_COPY(&stmt->fetch.into, &args[0]); in pdo_stmt_setup_fetch_mode()
2186 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2187 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2188 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()