Class AdminPageFramework_Zip
Compresses files into a zip file.
Usage
Pass a source directory/file path to the first parameter and a destination directory path to the second parameter. Then use thecompress()
method to perform archiving.
Example
$_oZip = new AdminPageFramework_Zip( $sSourcePath, $sDestinationPath ); $_bSucceed = $_oZip->compress();
Methods summary
public
|
#
__construct( string $sSource, string $sDestination, array|boolean $abOptions = false, array $aCallbacks = array() )
Sets up properties. Parameters
|
public
boolean
|
#
compress( )
Performs zip file compression. Returnsboolean True on success; false otherwise. Since
3.5.4
|
public
boolean
|
#
_replyToCompressDirectory( ZipArchive $oZip, mixed $sSourceDirPath, array $aCallbacks = array(), mixed $bIncludeDir = false, array $aAdditionalSourceDirs = array() )
Returnsboolean True on success, false otherwise. Since
3.5.4
3.6.0 Changed the name from _compressDirectory . Changed the scope
to public to allow overriding the method in an extended class. |
public
boolean
|
#
_replyToCompressFile( ZipArchive $oZip, mixed $sSourceFilePath, mixed $aCallbacks = null )
Compresses a file. Returnsboolean True on success, false otherwise. Since
3.5.4
3.6.0 Changed the name from _compressFile . Changed the scope from
private to allow overriding in an extended class. |
Magic methods summary
Properties summary
public
mixed
|
$sSource |
#
Stores a source directory/file path. |
public
mixed
|
$sDestination |
#
Stores a destination path of the target zip file. e.g. '/my_dir/myscript.zip' |
public
array
|
$aCallbacks |
#
Stores a callable that gets applied to parsing file string contents. |
public
array
|
$aOptions |
#
Stores settings. Since
3.6.0
|