1 | <?php |
||
21 | class RowIterator implements \Iterator |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $path; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $options; |
||
32 | |||
33 | /** |
||
34 | * @var resource |
||
35 | */ |
||
36 | protected $fileHandle; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | protected $currentKey; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $currentValue; |
||
47 | |||
48 | /** |
||
49 | * @var boolean |
||
50 | */ |
||
51 | protected $valid; |
||
52 | |||
53 | /** |
||
54 | * Constructor |
||
55 | * |
||
56 | * @param string $path |
||
57 | * @param array $options |
||
58 | */ |
||
59 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function current() |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function key() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function next() |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function rewind() |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function valid() |
||
122 | |||
123 | /** |
||
124 | * Sets the default options |
||
125 | * |
||
126 | * @param OptionsResolver $resolver |
||
127 | */ |
||
128 | protected function setDefaultOptions(OptionsResolver $resolver) |
||
140 | |||
141 | /** |
||
142 | * Opens the file resource |
||
143 | */ |
||
144 | protected function openResource() |
||
160 | |||
161 | /** |
||
162 | * Returns the server encoding |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | protected function getCurrentEncoding() |
||
172 | } |
||
173 |