Lines Matching refs:fetch

731 	zend_class_entry *ce = stmt->fetch.cls.ce;  in do_fetch_class_prepare()
732 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
733 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
738 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
746 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
751 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
758 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
794 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
795 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
797 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
800 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
809 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
810 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
812 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
814 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
816 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
819 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
820 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
821 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
822 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
823 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
825 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
826 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
827 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
856 if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
859 colno = stmt->fetch.column; in do_fetch()
898 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
924 old_ce = stmt->fetch.cls.ce; in do_fetch()
925 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
926 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
933 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
935 stmt->fetch.cls.ce = cep; in do_fetch()
942 ce = stmt->fetch.cls.ce; in do_fetch()
951 if (!stmt->fetch.cls.fci.size) { in do_fetch()
958 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
959 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
960 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
964 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
965 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
966 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
974 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
980 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
988 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
992 if (!stmt->fetch.func.fci.size) { in do_fetch()
1007 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1135 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1136 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1150 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1151 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1152 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1156 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1157 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1163 stmt->fetch.cls.ce = old_ce; in do_fetch()
1164 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1165 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1170 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1171 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1172 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1184 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1267 static PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1316 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1317 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1318 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1324 ZVAL_DUP(&stmt->fetch.cls.ctor_args, ctor_args); in PHP_METHOD()
1326 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1330 stmt->fetch.cls.ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1332 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1337 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1348 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1349 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1350 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1399 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1400 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1401 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1410 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1424 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1426 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1433 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1434 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1455 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1467 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1471 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1522 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1523 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1524 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1850 if (!Z_ISUNDEF(stmt->fetch.into)) { in pdo_stmt_setup_fetch_mode()
1851 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1852 ZVAL_UNDEF(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1911 stmt->fetch.column = Z_LVAL(args[skip+1]); in pdo_stmt_setup_fetch_mode()
1922 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1936 stmt->fetch.cls.ce = cep; in pdo_stmt_setup_fetch_mode()
1942 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1953 ZVAL_DUP(&stmt->fetch.cls.ctor_args, &args[skip+2]); in pdo_stmt_setup_fetch_mode()
1979 ZVAL_COPY(&stmt->fetch.into, &args[skip+1]); in pdo_stmt_setup_fetch_mode()
2165 PHP_ME(PDOStatement, fetch, arginfo_pdostatement_fetch, ZEND_ACC_PUBLIC)
2347 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2348 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2349 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()