Core_Zip
in package
Creates a zip archive
Tags
Table of Contents
- $_excludeDir : array<string|int, mixed>
- Exclude dir
- $_iFiles : int
- Files
- $_outputPath : mixed
- Output path
- $_Zip : mixed
- Zip object
- available() : bool
- Check Available
- excludeDir() : mixed
- Add Excluding Dir
- getZipClass() : object
- Get Zip Class
- getZipClassName() : bool
- Get Zip Class Name
- zipDir() : mixed
- Zip a folder.
- _folderToZip() : mixed
- Add files and sub-directories in a folder to zip file.
Properties
$_excludeDir
Exclude dir
protected
array<string|int, mixed>
$_excludeDir
= array()
$_iFiles
Files
protected
int
$_iFiles
= 0
$_outputPath
Output path
protected
mixed
$_outputPath
= \NULL
$_Zip
Zip object
protected
mixed
$_Zip
= \NULL
Methods
available()
Check Available
public
static available() : bool
Return values
bool —excludeDir()
Add Excluding Dir
public
excludeDir(mixed $dirPath) : mixed
Parameters
- $dirPath : mixed
Return values
mixed —getZipClass()
Get Zip Class
public
static getZipClass() : object
Return values
object —getZipClassName()
Get Zip Class Name
public
static getZipClassName() : bool
Return values
bool —zipDir()
Zip a folder.
public
zipDir(string $sourcePath, string $outZipPath) : mixed
Parameters
- $sourcePath : string
-
Path of directory to be zip.
- $outZipPath : string
-
Path of output zip file.
Return values
mixed —_folderToZip()
Add files and sub-directories in a folder to zip file.
protected
_folderToZip(string $folder, int $exclusiveLength) : mixed
Parameters
- $folder : string
- $exclusiveLength : int
-
Number of text to be exclusived from the file path.