Yaffs site version 1.1
[yaffs-website] / vendor / gabordemooij / redbean / RedBeanPHP / Cursor.php
1 <?php
2
3 namespace RedBeanPHP;
4
5 /**
6  * Database Cursor Interface.
7  * A cursor is used by Query Writers to fetch Query Result rows
8  * one row at a time. This is useful if you expect the result set to
9  * be quite large. This interface dscribes the API of a database
10  * cursor. There can be multiple implementations of the Cursor,
11  * by default RedBeanPHP offers the PDOCursor for drivers shipping
12  * with RedBeanPHP and the NULLCursor.
13  *
14  * @file    RedBeanPHP/Cursor.php
15  * @author  Gabor de Mooij and the RedBeanPHP Community
16  * @license BSD/GPLv2
17  *
18  * @copyright
19  * copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community
20  * This source file is subject to the BSD/GPLv2 License that is bundled
21  * with this source code in the file license.txt.
22  */
23 interface Cursor
24 {
25         /**
26          * Should retrieve the next row of the result set.
27          * This method is used to iterate over the result set.
28          *
29          * @return array
30          */
31         public function getNextItem();
32
33         /**
34          * Closes the database cursor.
35          * Some databases require a cursor to be closed before executing
36          * another statement/opening a new cursor.
37          *
38          * @return void
39          */
40         public function close();
41 }