1 | <?php |
||
16 | class RowIterator implements \Iterator |
||
17 | { |
||
18 | /** |
||
19 | * @var RowBuilderFactory |
||
20 | */ |
||
21 | protected $rowBuilderFactory; |
||
22 | |||
23 | /** |
||
24 | * @var ColumnIndexTransformer |
||
25 | */ |
||
26 | protected $columnIndexTransformer; |
||
27 | |||
28 | /** |
||
29 | * @var ValueTransformer |
||
30 | */ |
||
31 | protected $valueTransformer; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $path; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $options; |
||
42 | |||
43 | /** |
||
44 | * @var \XMLReader |
||
45 | */ |
||
46 | protected $xml; |
||
47 | |||
48 | /** |
||
49 | * @var int |
||
50 | */ |
||
51 | protected $currentKey; |
||
52 | |||
53 | /** |
||
54 | * @var array |
||
55 | */ |
||
56 | protected $currentValue; |
||
57 | |||
58 | /** |
||
59 | * @var boolean |
||
60 | */ |
||
61 | protected $valid; |
||
62 | |||
63 | /** |
||
64 | * The Archive from which the path was extracted. |
||
65 | * |
||
66 | * A reference to the object is kept here to ensure that it is not deleted |
||
67 | * before the RowIterator, as this would remove the extraction folder. |
||
68 | * |
||
69 | * @var Archive |
||
70 | */ |
||
71 | private $archive; |
||
72 | |||
73 | /** |
||
74 | * Constructor |
||
75 | * |
||
76 | * @param RowBuilderFactory $rowBuilderFactory |
||
77 | * @param ColumnIndexTransformer $columnIndexTransformer |
||
78 | * @param ValueTransformer $valueTransformer |
||
79 | * @param string $path |
||
80 | * @param array $options |
||
81 | * @param Archive $archive The Archive from which the path was extracted |
||
82 | */ |
||
83 | public function __construct( |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function current() |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function key() |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function next() |
||
168 | |||
169 | /** |
||
170 | * {@inheritdoc} |
||
171 | */ |
||
172 | public function rewind() |
||
181 | |||
182 | /** |
||
183 | * {@inheritdoc} |
||
184 | */ |
||
185 | public function valid() |
||
189 | |||
190 | /** |
||
191 | * Returns a normalized attribute value |
||
192 | * |
||
193 | * @param string $value |
||
194 | * |
||
195 | * @return string |
||
196 | */ |
||
197 | protected function getValue($value) |
||
201 | } |
||
202 |