Lines Matching refs:fetch
721 zend_class_entry *ce = stmt->fetch.cls.ce; in do_fetch_class_prepare()
722 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
723 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
728 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
734 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
739 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
746 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
782 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
783 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
785 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
788 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
797 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
798 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
800 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
802 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
804 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
807 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
808 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
809 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
810 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
811 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
813 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
814 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
815 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
844 if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
847 colno = stmt->fetch.column; in do_fetch()
886 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
912 old_ce = stmt->fetch.cls.ce; in do_fetch()
913 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
914 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
921 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
923 stmt->fetch.cls.ce = cep; in do_fetch()
930 ce = stmt->fetch.cls.ce; in do_fetch()
939 if (!stmt->fetch.cls.fci.size) { in do_fetch()
946 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
947 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
948 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
952 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
953 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
954 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
962 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
968 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
976 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
980 if (!stmt->fetch.func.fci.size) { in do_fetch()
995 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1123 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1124 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1138 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1139 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1140 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1144 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1145 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1151 stmt->fetch.cls.ce = old_ce; in do_fetch()
1152 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1153 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1158 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1159 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1160 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1172 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1255 static PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1308 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1309 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1310 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1316 ZVAL_DUP(&stmt->fetch.cls.ctor_args, ctor_args); in PHP_METHOD()
1318 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1322 stmt->fetch.cls.ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1324 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1329 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1340 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1341 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1342 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1395 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1396 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1397 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1406 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1420 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1422 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1429 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1430 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1451 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1463 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1467 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1518 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1519 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1520 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()
2174 PHP_ME(PDOStatement, fetch, arginfo_pdostatement_fetch, ZEND_ACC_PUBLIC)
2343 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2344 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2345 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()