Zip
class Zip extends Zip (View source)
Defines an archiver implementation for .zip files.
Properties
| protected ZipArchive | $zip | The underlying ZipArchive instance that does the heavy lifting. |
from Zip |
Methods
Details
in
Zip at line 29
__construct(string $file_path)
Constructs a Zip object.
in
Zip at line 39
$this
add(string $file_path)
Adds the specified file or directory to the archive.
in
Zip at line 48
$this
remove($file_path)
Removes the specified file from the archive.
in
Zip at line 57
$this
extract(string $path, array $files = [])
Extracts multiple files in the archive to the specified path.
in
Zip at line 71
array
listContents()
Lists all files in the archive.
in
Zip at line 89
ZipArchive
getArchive()
Retrieves the zip engine itself.
In some cases it may be necessary to directly access the underlying ZipArchive object for implementation-specific logic. This is for advanced use only as it is not shared by other implementations of ArchiveInterface.