1 | <?php |
||
4 | class Rows implements \Iterator, \Countable { |
||
5 | |||
6 | /** |
||
7 | * @var array |
||
8 | */ |
||
9 | private $columns = []; |
||
10 | |||
11 | /** |
||
12 | * @var int |
||
13 | */ |
||
14 | private $columnCount; |
||
15 | |||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $rowCount; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $current = 0; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $rows = []; |
||
30 | |||
31 | public function __construct(DataStream $stream, array $metadata) { |
||
47 | |||
48 | /** |
||
49 | * (PHP 5 >= 5.0.0)<br/> |
||
50 | * Return the current element |
||
51 | * @link http://php.net/manual/en/iterator.current.php |
||
52 | * @throws \OutOfRangeException |
||
53 | * @return mixed Can return any type. |
||
54 | */ |
||
55 | public function current() { |
||
71 | |||
72 | /** |
||
73 | * (PHP 5 >= 5.0.0)<br/> |
||
74 | * Move forward to next element |
||
75 | * @link http://php.net/manual/en/iterator.next.php |
||
76 | * @return void Any returned value is ignored. |
||
77 | */ |
||
78 | public function next() { |
||
81 | |||
82 | /** |
||
83 | * (PHP 5 >= 5.0.0)<br/> |
||
84 | * Return the key of the current element |
||
85 | * @link http://php.net/manual/en/iterator.key.php |
||
86 | * @return mixed scalar on success, or null on failure. |
||
87 | */ |
||
88 | public function key() { |
||
91 | |||
92 | /** |
||
93 | * (PHP 5 >= 5.0.0)<br/> |
||
94 | * Checks if current position is valid |
||
95 | * @link http://php.net/manual/en/iterator.valid.php |
||
96 | * @return boolean The return value will be casted to boolean and then evaluated. |
||
97 | * Returns true on success or false on failure. |
||
98 | */ |
||
99 | public function valid() { |
||
102 | |||
103 | /** |
||
104 | * (PHP 5 >= 5.0.0)<br/> |
||
105 | * Rewind the Iterator to the first element |
||
106 | * @link http://php.net/manual/en/iterator.rewind.php |
||
107 | * @return void Any returned value is ignored. |
||
108 | */ |
||
109 | public function rewind() { |
||
112 | |||
113 | /** |
||
114 | * (PHP 5 >= 5.1.0)<br/> |
||
115 | * Count elements of an object |
||
116 | * @link http://php.net/manual/en/countable.count.php |
||
117 | * @return int The custom count as an integer. |
||
118 | * </p> |
||
119 | * <p> |
||
120 | * The return value is cast to an integer. |
||
121 | */ |
||
122 | public function count() { |
||
125 | |||
126 | /** |
||
127 | * Return rows as array |
||
128 | * @return array |
||
129 | */ |
||
130 | public function asArray() { |
||
138 | } |