1 | <?php |
||
17 | final class ZipFactory |
||
18 | { |
||
19 | /** |
||
20 | * Comprime el contenido del archivo con el nombre especifico y retorna el contenido del zip. |
||
21 | * |
||
22 | * @param string $filename |
||
23 | * @param string $content |
||
24 | * @return string |
||
25 | */ |
||
26 | 44 | public function compress($filename, $content) |
|
33 | |||
34 | /** |
||
35 | * Retorna el contenido del archivo especificado dentro del zip. |
||
36 | * |
||
37 | * @param string $zipContent |
||
38 | * @param string $fileToExtract |
||
39 | * @return string |
||
40 | */ |
||
41 | 2 | public function decompress($zipContent, $fileToExtract) |
|
55 | |||
56 | /** |
||
57 | * Retorna el contenido del ultimo archivo dentro del zip. |
||
58 | * |
||
59 | * @param string $zipContent |
||
60 | * @return string |
||
61 | */ |
||
62 | 20 | public function decompressLastFile($zipContent) |
|
76 | } |