\Composer\Package\ArchiverArchiveManager

Summary

Methods
Properties
Constants
__construct()
addArchiver()
setOverwriteFiles()
getPackageFilename()
archive()
No public properties found
No constants found
No protected methods found
$downloadManager
$archivers
$overwriteFiles
N/A
No private methods found
No private properties found
N/A

Properties

$downloadManager

$downloadManager : 

Type

$archivers

$archivers : 

Type

$overwriteFiles

$overwriteFiles : boolean

Type

boolean

Methods

__construct()

__construct(\Composer\Downloader\DownloadManager  $downloadManager) 

Parameters

\Composer\Downloader\DownloadManager $downloadManager

A manager used to download package sources

setOverwriteFiles()

setOverwriteFiles(boolean  $overwriteFiles) : $this

Set whether existing archives should be overwritten

Parameters

boolean $overwriteFiles

New setting

Returns

$this

getPackageFilename()

getPackageFilename(\Composer\Package\PackageInterface  $package) : string

Generate a distinct filename for a particular version of a package.

Parameters

\Composer\Package\PackageInterface $package

The package to get a name for

Returns

string —

A filename without an extension

archive()

archive(\Composer\Package\PackageInterface  $package, string  $format, string  $targetDir, string|null  $fileName = null, boolean  $ignoreFilters = false) : string

Create an archive of the specified package.

Parameters

\Composer\Package\PackageInterface $package

The package to archive

string $format

The format of the archive (zip, tar, ...)

string $targetDir

The directory where to build the archive

string|null $fileName

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

boolean $ignoreFilters

Ignore filters when looking for files in the package

Throws

\InvalidArgumentException
\RuntimeException

Returns

string —

The path of the created archive