Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 2 |
1 | <?php |
||
24 | public function open($filename) |
||
25 | { |
||
26 | $this->filename = $filename; |
||
27 | $this->oZipArchive = new ZipArchive(); |
||
28 | |||
29 | if ($this->oZipArchive->open($this->filename, ZipArchive::OVERWRITE) === true) { |
||
30 | return $this; |
||
31 | } |
||
32 | if ($this->oZipArchive->open($this->filename, ZipArchive::CREATE) === true) { |
||
33 | return $this; |
||
34 | } |
||
35 | throw new \Exception("Could not open $this->filename for writing."); |
||
36 | } |
||
37 | |||
60 |