Lines Matching refs:fetch

725 	zend_class_entry *ce = stmt->fetch.cls.ce;  in do_fetch_class_prepare()
726 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
727 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
732 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
738 fci->retval = &stmt->fetch.cls.retval; in do_fetch_class_prepare()
743 zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
750 } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_class_prepare()
786 zend_fcall_info *fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
787 zend_fcall_info_cache *fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
789 if (!make_callable_ex(stmt, &stmt->fetch.func.function, fci, fcc, stmt->column_count)) { in do_fetch_func_prepare()
792 stmt->fetch.func.values = safe_emalloc(sizeof(zval), stmt->column_count, 0); in do_fetch_func_prepare()
801 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
802 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) { in do_fetch_opt_finish()
804 zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1); in do_fetch_opt_finish()
806 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
808 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
811 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
812 if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) { in do_fetch_opt_finish()
813 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
814 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
815 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
817 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
818 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
819 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
848 if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
851 colno = stmt->fetch.column; in do_fetch()
890 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
916 old_ce = stmt->fetch.cls.ce; in do_fetch()
917 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in do_fetch()
918 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
925 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
927 stmt->fetch.cls.ce = cep; in do_fetch()
934 ce = stmt->fetch.cls.ce; in do_fetch()
943 if (!stmt->fetch.cls.fci.size) { in do_fetch()
950 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
951 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
952 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
956 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
957 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
958 ZVAL_UNDEF(&stmt->fetch.cls.retval); in do_fetch()
966 if (Z_ISUNDEF(stmt->fetch.into)) { in do_fetch()
972 ZVAL_COPY(return_value, &stmt->fetch.into); in do_fetch()
980 if (Z_ISUNDEF(stmt->fetch.func.function)) { in do_fetch()
984 if (!stmt->fetch.func.fci.size) { in do_fetch()
999 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1127 ZVAL_COPY_VALUE(&stmt->fetch.func.values[idx], &val); in do_fetch()
1128 ZVAL_COPY_VALUE(&stmt->fetch.cls.fci.params[idx], &stmt->fetch.func.values[idx]); in do_fetch()
1142 stmt->fetch.cls.fci.object = Z_OBJ_P(return_value); in do_fetch()
1143 stmt->fetch.cls.fcc.object = Z_OBJ_P(return_value); in do_fetch()
1144 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc) == FAILURE) { in do_fetch()
1148 if (!Z_ISUNDEF(stmt->fetch.cls.retval)) { in do_fetch()
1149 zval_ptr_dtor(&stmt->fetch.cls.retval); in do_fetch()
1155 stmt->fetch.cls.ce = old_ce; in do_fetch()
1156 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in do_fetch()
1157 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1162 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1163 stmt->fetch.func.fci.retval = &retval; in do_fetch()
1164 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc) == FAILURE) { in do_fetch()
1176 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1259 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()
1391 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1392 ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); in PHP_METHOD()
1393 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1402 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1416 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ in PHP_METHOD()
1418 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in PHP_METHOD()
1425 stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); in PHP_METHOD()
1426 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1447 ZVAL_COPY_VALUE(&stmt->fetch.func.function, arg2); in PHP_METHOD()
1459 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1463 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1514 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1515 ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); in PHP_METHOD()
1516 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1844 if (!Z_ISUNDEF(stmt->fetch.into)) { in pdo_stmt_setup_fetch_mode()
1845 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1846 ZVAL_UNDEF(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1905 stmt->fetch.column = Z_LVAL(args[skip+1]); in pdo_stmt_setup_fetch_mode()
1916 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1930 stmt->fetch.cls.ce = cep; in pdo_stmt_setup_fetch_mode()
1936 ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1947 ZVAL_DUP(&stmt->fetch.cls.ctor_args, &args[skip+2]); in pdo_stmt_setup_fetch_mode()
1973 ZVAL_COPY(&stmt->fetch.into, &args[skip+1]); in pdo_stmt_setup_fetch_mode()
2159 PHP_ME(PDOStatement, fetch, arginfo_pdostatement_fetch, ZEND_ACC_PUBLIC)
2341 if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) { in php_pdo_free_statement()
2342 zval_ptr_dtor(&stmt->fetch.into); in php_pdo_free_statement()
2343 ZVAL_UNDEF(&stmt->fetch.into); in php_pdo_free_statement()