Lines Matching refs:iterator

45 	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()
56 ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(object)); in php_mysqli_result_get_iterator()
57 iterator->intern.funcs = &php_mysqli_result_iterator_funcs; in php_mysqli_result_get_iterator()
58 iterator->result = Z_MYSQLI_P(object); in php_mysqli_result_get_iterator()
59 iterator->row_num = -1; in php_mysqli_result_get_iterator()
61 return &iterator->intern; in php_mysqli_result_get_iterator()
68 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*)iter; in php_mysqli_result_iterator_dtor() local
71 zval_ptr_dtor(&iterator->intern.data); in php_mysqli_result_iterator_dtor()
72 zval_ptr_dtor(&iterator->current_row); in php_mysqli_result_iterator_dtor()
79 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_valid() local
81 return Z_TYPE(iterator->current_row) == IS_ARRAY ? SUCCESS : FAILURE; in php_mysqli_result_iterator_valid()
88 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_current_data() local
90 return &iterator->current_row; in php_mysqli_result_iterator_current_data()
98 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_move_forward() local
99 mysqli_object *intern = iterator->result; in php_mysqli_result_iterator_move_forward()
104 zval_ptr_dtor(&iterator->current_row); in php_mysqli_result_iterator_move_forward()
105 php_mysqli_fetch_into_hash_aux(&iterator->current_row, result, MYSQLI_ASSOC); in php_mysqli_result_iterator_move_forward()
106 if (Z_TYPE(iterator->current_row) == IS_ARRAY) { in php_mysqli_result_iterator_move_forward()
107 iterator->row_num++; in php_mysqli_result_iterator_move_forward()
115 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_rewind() local
116 mysqli_object *intern = iterator->result; in php_mysqli_result_iterator_rewind()
129 iterator->row_num = -1; in php_mysqli_result_iterator_rewind()
137 php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*) iter; in php_mysqli_result_iterator_current_key() local
139 ZVAL_LONG(key, iterator->row_num); in php_mysqli_result_iterator_current_key()