1 | <?php |
||
12 | class ZipResourceIterator implements PackagedResourceIterator, ResourceReaderResolver |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var \ZipArchive |
||
17 | */ |
||
18 | private $archive; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $current = 0; |
||
24 | |||
25 | /** |
||
26 | * @var PackagedResource |
||
27 | */ |
||
28 | private $parent; |
||
29 | |||
30 | /** |
||
31 | * @param PackagedResource $parent |
||
32 | */ |
||
33 | public function __construct(PackagedResource $parent) { |
||
39 | |||
40 | /** |
||
41 | * (PHP 5 >= 5.0.0)<br/> |
||
42 | * Move forward to next element |
||
43 | * @link http://php.net/manual/en/iterator.next.php |
||
44 | * @return void Any returned value is ignored. |
||
45 | */ |
||
46 | public function next() |
||
50 | |||
51 | /** |
||
52 | * (PHP 5 >= 5.0.0)<br/> |
||
53 | * Return the key of the current element |
||
54 | * @link http://php.net/manual/en/iterator.key.php |
||
55 | * @return mixed scalar on success, or null on failure. |
||
56 | */ |
||
57 | public function key() |
||
61 | |||
62 | /** |
||
63 | * (PHP 5 >= 5.0.0)<br/> |
||
64 | * Checks if current position is valid |
||
65 | * @link http://php.net/manual/en/iterator.valid.php |
||
66 | * @return boolean The return value will be casted to boolean and then evaluated. |
||
67 | * Returns true on success or false on failure. |
||
68 | */ |
||
69 | public function valid() |
||
73 | |||
74 | /** |
||
75 | * (PHP 5 >= 5.0.0)<br/> |
||
76 | * Rewind the Iterator to the first element |
||
77 | * @link http://php.net/manual/en/iterator.rewind.php |
||
78 | * @return void Any returned value is ignored. |
||
79 | */ |
||
80 | public function rewind() |
||
84 | |||
85 | /** |
||
86 | * @return PackagedResource |
||
87 | */ |
||
88 | public function current() |
||
99 | |||
100 | /** |
||
101 | * Resolves a reader for the given resource URI. |
||
102 | * |
||
103 | * @param ResourceUri $resource |
||
104 | * @return ResourceReader |
||
105 | */ |
||
106 | public function resolveReader(ResourceUri $resource) |
||
110 | } |
||
111 |