PharArchiver
in package
implements
ArchiverInterface
Tags
Interfaces, Classes and Traits
Table of Contents
- $compressFormats : mixed
- $formats : mixed
- archive() : string
- Create an archive from the sources.
- supports() : bool
- Format supported by the archiver.
Properties
$compressFormats
protected
static mixed
$compressFormats
= array('tar.gz' => Phar::GZ, 'tar.bz2' => Phar::BZ2)
$formats
protected
static mixed
$formats
= array('zip' => Phar::ZIP, 'tar' => Phar::TAR, 'tar.gz' => Phar::TAR, 'tar.bz2' => Phar::TAR)
Methods
archive()
Create an archive from the sources.
public
archive(mixed $sources, mixed $target, mixed $format[, array<string|int, mixed> $excludes = array() ][, mixed $ignoreFilters = false ]) : string
Parameters
- $sources : mixed
-
The sources directory
- $target : mixed
-
The target file
- $format : mixed
-
The format used for archive
- $excludes : array<string|int, mixed> = array()
-
A list of patterns for files to exclude
- $ignoreFilters : mixed = false
Return values
string —The path to the written archive file
supports()
Format supported by the archiver.
public
supports(mixed $format, mixed $sourceType) : bool
Parameters
- $format : mixed
-
The archive format
- $sourceType : mixed
-
The source type (git, svn, hg, etc.)
Return values
bool —true if the format is supported by the archiver