The zip helper allows you to interact with the Zip files.
Zip factory
Zip::factory();
Add Directory
Zip::factory()->addDir('test');
Add Data to Zip
Zip::factory()->addData('test.txt', 'Some test text here');
Read the contents of a file and add it to the zip
Zip::factory()->readFile('test.txt');
Read a directory and add it to the zip.
Zip::factory()->readDir('test/');
Get the Zip file.
Zip::factory()->getZip();
Write File to the specified directory
Zip::factory()->readDir('test1/')->readDir('test2/')->archive('test.zip');
Initialize Data
Zip::factory()->clearData();