ArchiveManager
in package
Tags
Table of Contents
- $archivers : mixed
- $downloadManager : mixed
- $overwriteFiles : bool
- __construct() : mixed
- addArchiver() : mixed
- archive() : string
- Create an archive of the specified package.
- getPackageFilename() : string
- Generate a distinct filename for a particular version of a package.
- setOverwriteFiles() : $this
- Set whether existing archives should be overwritten
Properties
$archivers
protected
mixed
$archivers
= array()
$downloadManager
protected
mixed
$downloadManager
$overwriteFiles
protected
bool
$overwriteFiles
= true
Methods
__construct()
public
__construct(DownloadManager $downloadManager) : mixed
Parameters
- $downloadManager : DownloadManager
-
A manager used to download package sources
Return values
mixed —addArchiver()
public
addArchiver(ArchiverInterface $archiver) : mixed
Parameters
- $archiver : ArchiverInterface
Return values
mixed —archive()
Create an archive of the specified package.
public
archive(PackageInterface $package, string $format, string $targetDir[, string|null $fileName = null ][, bool $ignoreFilters = false ]) : string
Parameters
- $package : PackageInterface
-
The package to archive
- $format : string
-
The format of the archive (zip, tar, ...)
- $targetDir : string
-
The directory where to build the archive
- $fileName : string|null = null
-
The relative file name to use for the archive, or null to generate the package name. Note that the format will be appended to this name
- $ignoreFilters : bool = false
-
Ignore filters when looking for files in the package
Tags
Return values
string —The path of the created archive
getPackageFilename()
Generate a distinct filename for a particular version of a package.
public
getPackageFilename(PackageInterface $package) : string
Parameters
- $package : PackageInterface
-
The package to get a name for
Return values
string —A filename without an extension
setOverwriteFiles()
Set whether existing archives should be overwritten
public
setOverwriteFiles(bool $overwriteFiles) : $this
Parameters
- $overwriteFiles : bool
-
New setting