ZipManager
class ZipManager implements Countable (View source)
Multiple Comodojo\Zip\Zip manager
Methods
Count the number of Zip objects registered to the manager
Remove a Zip object from manager by Zip id
Get a list of all registered Zips filenames as an array
Get a Zip object by Id
Set current base path (to add relative files to zip archive) for all Zips
Get a list of paths used by Zips
Set default file mask for all Zips
Get a list of masks from Zips
Get a list of files in Zips
Extract Zips to common destination
Merge multiple Zips into one
Add a file to all registered Zips
Delete a file from any registered Zip
Close all Zips
Details
int
count()
Count the number of Zip objects registered to the manager
string
addZip(ZipInterface $zip)
Add a Zip object to manager and return its id
bool
removeZip(ZipInterface $zip)
Remove a Zip object from manager
bool
removeZipById(string $id)
Remove a Zip object from manager by Zip id
array
listZips()
Get a list of all registered Zips filenames as an array
ZipInterface
getZip(string $id)
Get a Zip object by Id
ZipManager
setPath(string $path)
Set current base path (to add relative files to zip archive) for all Zips
array
getPath()
Get a list of paths used by Zips
ZipManager
setMask(int $mask)
Set default file mask for all Zips
array
getMask()
Get a list of masks from Zips
array
listFiles()
Get a list of files in Zips
bool
extract(string $destination, bool $separate = true, mixed $files = null)
Extract Zips to common destination
bool
merge(string $output_zip_file, bool $separate = true)
Merge multiple Zips into one
ZipManager
add(mixed $file_name_or_array, bool $flatten_root_folder = false)
Add a file to all registered Zips
ZipManager
delete(mixed $file_name_or_array)
Delete a file from any registered Zip
bool
close()
Close all Zips