Lines Matching refs:iterator
47 php_mysqli_result_iterator *iterator; in php_mysqli_result_get_iterator() local
52 iterator = ecalloc(1, sizeof(php_mysqli_result_iterator)); in php_mysqli_result_get_iterator()
53 zend_iterator_init(&iterator->intern); in php_mysqli_result_get_iterator()
55 ZVAL_COPY(&iterator->intern.data, object); in php_mysqli_result_get_iterator()
56 iterator->intern.funcs = &php_mysqli_result_iterator_funcs; in php_mysqli_result_get_iterator()
57 iterator->result = Z_MYSQLI_P(object); in php_mysqli_result_get_iterator()
58 iterator->row_num = -1; in php_mysqli_result_get_iterator()
60 return &iterator->intern; in php_mysqli_result_get_iterator()
67 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*)iter; in php_mysqli_result_iterator_dtor() local
70 zval_ptr_dtor(&iterator->intern.data); in php_mysqli_result_iterator_dtor()
71 zval_ptr_dtor(&iterator->current_row); in php_mysqli_result_iterator_dtor()
78 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_valid() local
80 return Z_TYPE(iterator->current_row) == IS_ARRAY ? SUCCESS : FAILURE; in php_mysqli_result_iterator_valid()
87 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_current_data() local
89 return &iterator->current_row; in php_mysqli_result_iterator_current_data()
97 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_move_forward() local
98 mysqli_object *intern = iterator->result; in php_mysqli_result_iterator_move_forward()
103 zval_ptr_dtor(&iterator->current_row); in php_mysqli_result_iterator_move_forward()
104 php_mysqli_fetch_into_hash_aux(&iterator->current_row, result, MYSQLI_ASSOC); in php_mysqli_result_iterator_move_forward()
105 if (Z_TYPE(iterator->current_row) == IS_ARRAY) { in php_mysqli_result_iterator_move_forward()
106 iterator->row_num++; in php_mysqli_result_iterator_move_forward()
114 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; local
115 mysqli_object *intern = iterator->result;
132 iterator->row_num = -1;
140 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; local
142 ZVAL_LONG(key, iterator->row_num);