1 | <?php |
||
19 | class ZipFile implements FileInterface |
||
20 | { |
||
21 | /** |
||
22 | * The ZipArchive. |
||
23 | * |
||
24 | * @var \ZipArchive |
||
25 | */ |
||
26 | private $zip; |
||
27 | |||
28 | /** |
||
29 | * The Info object retrieved from the ZipFile. |
||
30 | * |
||
31 | * @var Info |
||
32 | */ |
||
33 | private $info; |
||
34 | |||
35 | /** |
||
36 | * The filepath where the file is opened from. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private $filePath; |
||
41 | |||
42 | |||
43 | /** |
||
44 | * Create the object based on the file path. |
||
45 | * |
||
46 | * @param string $filePath |
||
47 | * The full file path to the Zip file. |
||
48 | * |
||
49 | * @throws FileException |
||
50 | * When the file can not be opened. |
||
51 | */ |
||
52 | 12 | public function __construct($filePath) |
|
79 | |||
80 | /** |
||
81 | * Close the ZipArchive when the object is destructed. |
||
82 | */ |
||
83 | 6 | public function __destruct() |
|
89 | |||
90 | /** |
||
91 | * @inheritDoc |
||
92 | */ |
||
93 | 3 | public function getInfo() |
|
106 | |||
107 | /** |
||
108 | * @inheritDoc |
||
109 | */ |
||
110 | 6 | public function getContent($path) |
|
128 | } |
||
129 |