1 | <?php |
||
21 | class InfoFiles implements \Iterator, \Countable |
||
22 | { |
||
23 | /** |
||
24 | * The array collection. |
||
25 | * |
||
26 | * @var InfoFile[] |
||
27 | */ |
||
28 | private $files = []; |
||
29 | |||
30 | /** |
||
31 | * The current item. |
||
32 | * |
||
33 | * @var int |
||
34 | */ |
||
35 | private $pointer = 0; |
||
36 | |||
37 | /** |
||
38 | * Construct the object by passing the \SimpleXmlElement. |
||
39 | * |
||
40 | * @param \SimpleXmlElement $xml |
||
41 | */ |
||
42 | 12 | public function __construct(\SimpleXMLElement $xml) |
|
59 | |||
60 | /** |
||
61 | * Get the current file. |
||
62 | * |
||
63 | * @return InfoFile |
||
64 | */ |
||
65 | 3 | public function current() |
|
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | 3 | public function next() |
|
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | 3 | public function key() |
|
85 | |||
86 | /** |
||
87 | * @inheritDoc |
||
88 | */ |
||
89 | 6 | public function valid() |
|
93 | |||
94 | /** |
||
95 | * @inheritDoc |
||
96 | */ |
||
97 | 3 | public function rewind() |
|
101 | |||
102 | /** |
||
103 | * @inheritDoc |
||
104 | */ |
||
105 | 6 | public function count() |
|
109 | } |
||
110 |