Methods

Constructor of ArchiveExtractor, load the file list

__construct($source, $filename) : void
access public

Parameters

$source

path to the temp directory

$filename

name of zip archive

Exceptions

\cException if the source file does not exists

closeArchive()

closeArchive() 

Destory temporary plugin files (plugin.xml, plugin_install.sql and files at CONTENIDO temp dir)

destroyTempFiles() : void
access public

Extracts the whole archive

extractArchive() : void
access public

Exceptions

\cException if the extraction failed

Extracts a specific file from archive and return its content to use it in a variable

extractArchiveFileToVariable($filename, $content) : string
access public

Parameters

$filename

string

$content

bool [optional] whether to return the content or just the dir and filename of the extracted file

Returns

stringcontent of extracted file or dir and filename of extracted File

Sets the path where the extractor extracts the archive files

setDestinationPath($destination) : void
access public

Parameters

$destination

string

Exceptions

\cException if the destination path can not set (directory is not writable)
\cException if the defined destination already exists

 Properties

 

$_absPath : string
 

$_destination : string
 

$_extractor : integer
 

$_source : string
 

$tempDir : string