Lines Matching refs:fetch

744 	zend_class_entry * ce = stmt->fetch.cls.ce;  in do_fetch_class_prepare()
745 zend_fcall_info * fci = &stmt->fetch.cls.fci; in do_fetch_class_prepare()
746 zend_fcall_info_cache * fcc = &stmt->fetch.cls.fcc; in do_fetch_class_prepare()
751 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch_class_prepare()
759 fci->retval_ptr_ptr = &stmt->fetch.cls.retval_ptr; in do_fetch_class_prepare()
760 if (stmt->fetch.cls.ctor_args) { in do_fetch_class_prepare()
761 HashTable *ht = Z_ARRVAL_P(stmt->fetch.cls.ctor_args); in do_fetch_class_prepare()
782 } else if (stmt->fetch.cls.ctor_args) { in do_fetch_class_prepare()
818 zend_fcall_info * fci = &stmt->fetch.cls.fci; in do_fetch_func_prepare()
819 zend_fcall_info_cache * fcc = &stmt->fetch.cls.fcc; in do_fetch_func_prepare()
821 if (!make_callable_ex(stmt, stmt->fetch.func.function, fci, fcc, stmt->column_count TSRMLS_CC)) { in do_fetch_func_prepare()
824 stmt->fetch.func.values = safe_emalloc(sizeof(zval*), stmt->column_count, 0); in do_fetch_func_prepare()
833 if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { in do_fetch_opt_finish()
834 efree(stmt->fetch.cls.fci.params); in do_fetch_opt_finish()
835 stmt->fetch.cls.fci.params = NULL; in do_fetch_opt_finish()
837 stmt->fetch.cls.fci.size = 0; in do_fetch_opt_finish()
838 if (stmt->fetch.cls.ctor_args && free_ctor_agrs) { in do_fetch_opt_finish()
839 zval_ptr_dtor(&stmt->fetch.cls.ctor_args); in do_fetch_opt_finish()
840 stmt->fetch.cls.ctor_args = NULL; in do_fetch_opt_finish()
841 stmt->fetch.cls.fci.param_count = 0; in do_fetch_opt_finish()
843 if (stmt->fetch.func.values) { in do_fetch_opt_finish()
844 efree(stmt->fetch.func.values); in do_fetch_opt_finish()
845 stmt->fetch.func.values = NULL; in do_fetch_opt_finish()
876 if (flags & PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
879 colno = stmt->fetch.column; in do_fetch()
919 if (flags == PDO_FETCH_GROUP && stmt->fetch.column == -1) { in do_fetch()
945 old_ce = stmt->fetch.cls.ce; in do_fetch()
946 old_ctor_args = stmt->fetch.cls.ctor_args; in do_fetch()
947 old_arg_count = stmt->fetch.cls.fci.param_count; in do_fetch()
955 stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR; in do_fetch()
957 stmt->fetch.cls.ce = *cep; in do_fetch()
964 ce = stmt->fetch.cls.ce; in do_fetch()
971 if (!stmt->fetch.cls.fci.size) { in do_fetch()
978 stmt->fetch.cls.fci.object_ptr = return_value; in do_fetch()
979 stmt->fetch.cls.fcc.object_ptr = return_value; in do_fetch()
980 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc TSRMLS_CC) == FAILURE) { in do_fetch()
984 if (stmt->fetch.cls.retval_ptr) { in do_fetch()
985 zval_ptr_dtor(&stmt->fetch.cls.retval_ptr); in do_fetch()
993 if (!stmt->fetch.into) { in do_fetch()
1000 Z_OBJ_HANDLE_P(return_value) = Z_OBJ_HANDLE_P(stmt->fetch.into); in do_fetch()
1001 Z_OBJ_HT_P(return_value) = Z_OBJ_HT_P(stmt->fetch.into); in do_fetch()
1002 zend_objects_store_add_ref(stmt->fetch.into TSRMLS_CC); in do_fetch()
1010 if (!stmt->fetch.func.function) { in do_fetch()
1014 if (!stmt->fetch.func.fci.size) { in do_fetch()
1030 if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) { in do_fetch()
1161 stmt->fetch.func.values[idx] = val; in do_fetch()
1162 stmt->fetch.cls.fci.params[idx] = &stmt->fetch.func.values[idx]; in do_fetch()
1176 stmt->fetch.cls.fci.object_ptr = return_value; in do_fetch()
1177 stmt->fetch.cls.fcc.object_ptr = return_value; in do_fetch()
1178 if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc TSRMLS_CC) == FAILURE) { in do_fetch()
1182 if (stmt->fetch.cls.retval_ptr) { in do_fetch()
1183 zval_ptr_dtor(&stmt->fetch.cls.retval_ptr); in do_fetch()
1189 stmt->fetch.cls.ce = old_ce; in do_fetch()
1190 stmt->fetch.cls.ctor_args = old_ctor_args; in do_fetch()
1191 stmt->fetch.cls.fci.param_count = old_arg_count; in do_fetch()
1196 stmt->fetch.func.fci.param_count = idx; in do_fetch()
1197 stmt->fetch.func.fci.retval_ptr_ptr = &retval; in do_fetch()
1198 if (zend_call_function(&stmt->fetch.func.fci, &stmt->fetch.func.fcc TSRMLS_CC) == FAILURE) { in do_fetch()
1211 zval_ptr_dtor(&stmt->fetch.func.values[idx]); in do_fetch()
1295 static PHP_METHOD(PDOStatement, fetch) in PHP_METHOD() argument
1345 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1346 old_ctor_args = stmt->fetch.cls.ctor_args; in PHP_METHOD()
1347 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1353 ALLOC_ZVAL(stmt->fetch.cls.ctor_args); in PHP_METHOD()
1354 *stmt->fetch.cls.ctor_args = *ctor_args; in PHP_METHOD()
1355 zval_copy_ctor(stmt->fetch.cls.ctor_args); in PHP_METHOD()
1357 stmt->fetch.cls.ctor_args = NULL; in PHP_METHOD()
1361 …stmt->fetch.cls.ce = zend_fetch_class(class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); in PHP_METHOD()
1363 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1368 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1379 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1380 stmt->fetch.cls.ctor_args = old_ctor_args; in PHP_METHOD()
1381 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1430 old_ce = stmt->fetch.cls.ce; in PHP_METHOD()
1431 old_ctor_args = stmt->fetch.cls.ctor_args; in PHP_METHOD()
1432 old_arg_count = stmt->fetch.cls.fci.param_count; in PHP_METHOD()
1441 stmt->fetch.cls.ce = zend_standard_class_def; in PHP_METHOD()
1454 stmt->fetch.cls.ctor_args = ctor_args; /* we're not going to free these */ in PHP_METHOD()
1460 …stmt->fetch.cls.ce = zend_fetch_class(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2), ZEND_FETCH_CLASS_AUTO TS… in PHP_METHOD()
1461 if (!stmt->fetch.cls.ce) { in PHP_METHOD()
1482 stmt->fetch.func.function = arg2; in PHP_METHOD()
1494 stmt->fetch.column = how & PDO_FETCH_GROUP ? -1 : 0; in PHP_METHOD()
1498 stmt->fetch.column = Z_LVAL_P(arg2); in PHP_METHOD()
1555 stmt->fetch.cls.ce = old_ce; in PHP_METHOD()
1556 stmt->fetch.cls.ctor_args = old_ctor_args; in PHP_METHOD()
1557 stmt->fetch.cls.fci.param_count = old_arg_count; in PHP_METHOD()
1879 if (stmt->fetch.into) { in pdo_stmt_setup_fetch_mode()
1880 zval_ptr_dtor(&stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
1881 stmt->fetch.into = NULL; in pdo_stmt_setup_fetch_mode()
1940 stmt->fetch.column = Z_LVAL_PP(args[skip+1]); in pdo_stmt_setup_fetch_mode()
1951 stmt->fetch.cls.ce = NULL; in pdo_stmt_setup_fetch_mode()
1966 stmt->fetch.cls.ce = *cep; in pdo_stmt_setup_fetch_mode()
1972 stmt->fetch.cls.ctor_args = NULL; in pdo_stmt_setup_fetch_mode()
1983 ALLOC_ZVAL(stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
1984 *stmt->fetch.cls.ctor_args = **args[skip+2]; in pdo_stmt_setup_fetch_mode()
1985 zval_copy_ctor(stmt->fetch.cls.ctor_args); in pdo_stmt_setup_fetch_mode()
2011 MAKE_STD_ZVAL(stmt->fetch.into); in pdo_stmt_setup_fetch_mode()
2013 Z_TYPE_P(stmt->fetch.into) = IS_OBJECT; in pdo_stmt_setup_fetch_mode()
2014 Z_OBJ_HANDLE_P(stmt->fetch.into) = Z_OBJ_HANDLE_PP(args[skip+1]); in pdo_stmt_setup_fetch_mode()
2015 Z_OBJ_HT_P(stmt->fetch.into) = Z_OBJ_HT_PP(args[skip+1]); in pdo_stmt_setup_fetch_mode()
2016 zend_objects_store_add_ref(stmt->fetch.into TSRMLS_CC); in pdo_stmt_setup_fetch_mode()
2205 PHP_ME(PDOStatement, fetch, arginfo_pdostatement_fetch, ZEND_ACC_PUBLIC)
2399 if (stmt->fetch.into && stmt->default_fetch_type == PDO_FETCH_INTO) { in free_statement()
2400 FREE_ZVAL(stmt->fetch.into); in free_statement()
2401 stmt->fetch.into = NULL; in free_statement()