PHP Class Pop\Archive\Adapter\Zip

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Archive\Adapter\ArchiveInterface
Exibir arquivo Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$archive ZipArchive ZipArchive object
$path string Archive path
$workingDir string Working directory

Public Methods

Method Description
__construct ( Archive $archive ) : Zip Method to instantiate an archive adapter object
addDir ( array $branch, string $level = null, string $orig = null ) : void Method to create sub directories within the zip archive
addFiles ( string | array $files ) : void Method to create an archive file
archive ( ) : mixed Method to return the archive object
extract ( string $to = null ) : void Method to extract an archived and/or compressed file
getDirs ( ) : array Method to return an array of all the directories in the archive
listFiles ( boolean $full = false ) : array Method to return a listing of the contents of an archived file

Method Details

__construct() public method

Method to instantiate an archive adapter object
public __construct ( Archive $archive ) : Zip
$archive Pop\Archive\Archive
return Zip

addDir() public method

Method to create sub directories within the zip archive
public addDir ( array $branch, string $level = null, string $orig = null ) : void
$branch array
$level string
$orig string
return void

addFiles() public method

Method to create an archive file
public addFiles ( string | array $files ) : void
$files string | array
return void

archive() public method

Method to return the archive object
public archive ( ) : mixed
return mixed

extract() public method

Method to extract an archived and/or compressed file
public extract ( string $to = null ) : void
$to string
return void

getDirs() public method

Method to return an array of all the directories in the archive
public getDirs ( ) : array
return array

listFiles() public method

Method to return a listing of the contents of an archived file
public listFiles ( boolean $full = false ) : array
$full boolean
return array

Property Details

$archive protected_oe property

ZipArchive object
protected ZipArchive $archive
return ZipArchive

$path protected_oe property

Archive path
protected string $path
return string

$workingDir protected_oe property

Working directory
protected string $workingDir
return string