Documentation

The complete class documentation.

Content

Methods Properties Constants
No public properties
No protected methods No protected properties N/A
N/A

Constants

VERSION

VERSION : string

string - Current Zippr version


Properties

$name

$name : string

string - Path for zip file

$zip

$name : object

string - Instance of ZipArchive


Methods

__construct()

__construct(string $name) : void

Zippr constructor method. Call for checkDependencies and set $name and $zip.

Parameters
string $name Path to new zipfile

__destruct()

__destruct() : void

Zippr destruct method. Save created zip file.

addDir()

addDir(string $dir, string $location) : void

Add a directory to the zip archive.

Parameters
string $dir Path to directory to add
string $location Target directory in zip file

addFile()

addFile(string $file, string $location) : void

Add a file to the zip archive.

Parameters
string $file Path to file to add
string $location Target directory in zip file

extractArchive()

static extractArchive(string $archive, string $location) : void

Extract a zip archive.

Parameters
string $archive Path to zip archive
string $location Target (extract) directory

getVersion()

getVersion() : void

Get current Zippr version.

Return
string Current Zippr version

setComment()

setComment(string $comment) : void

Set comment for zip archive.

Parameters
string $comment Comment to zip archive

checkDependencies()

checkDependencies() : void

Check Zippr dependencies.

Fork me on GitHub