This plugins allows you to create ZIP archives.
Follow the instructions in our manual to add our package repository and then run the below command.
apt-get install halon-extras-zip
yum install halon-extras-zip
tdnf install -y halon-extras-zip
These classes needs to be imported from the extras://zip module path.
Create a new ZIP archive.
Returns: class object
$x = ZIP();
$x->addFile("test.txt", "hello");
$x->addFile("test2.txt", "world");
echo $x->toString(["password" => "12345678"]);
Add a file to the ZIP archive options. On error an exception is thrown.
Params
- name
string- the name - data
string- the data
Returns: this
Return type: ZIP
Return the ZIP file as a string. On error an exception is thrown.
Params
- options
array- an options array
The following options are available in the options array.
- password
string- A password if the file should be encrypted (AES256)
Returns: zip data
Return type: string