Documentation

ArchiveManager
in package

Tags
author

Matthieu Moquet matthieu@moquet.net

author

Till Klampaeckel till@php.net

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

Methods

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
throws
InvalidArgumentException
throws
RuntimeException
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

Return values
$this

Search results