Lines Matching refs:iterator
44 php_mysqli_result_iterator *iterator; in php_mysqli_result_get_iterator() local
51 iterator = ecalloc(1, sizeof(php_mysqli_result_iterator)); in php_mysqli_result_get_iterator()
52 zend_iterator_init(&iterator->intern); in php_mysqli_result_get_iterator()
55 ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(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; in php_mysqli_result_iterator_rewind() local
115 mysqli_object *intern = iterator->result; in php_mysqli_result_iterator_rewind()
128 iterator->row_num = -1; in php_mysqli_result_iterator_rewind()
136 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_current_key() local
138 ZVAL_LONG(key, iterator->row_num); in php_mysqli_result_iterator_current_key()