1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Nette\Database;
9:
10:
11: /**
12: * Container of database result fetched into IRow.
13: */
14: interface IRowContainer extends \Traversable
15: {
16:
17: /**
18: * Fetches single row object.
19: * @return IRow|bool if there is no row
20: */
21: function fetch();
22:
23: /**
24: * Fetches all rows as associative array.
25: * @param string|int column name used for an array key or null for numeric index
26: * @param string|int column name used for an array value or null for the whole row
27: * @return array
28: */
29: function fetchPairs($key = null, $value = null);
30:
31: /**
32: * Fetches all rows.
33: * @return IRow[]
34: */
35: function fetchAll();
36:
37: /**
38: * Fetches all rows and returns associative tree.
39: * @param string associative descriptor
40: * @return array
41: */
42: function fetchAssoc($path);
43: }
44: