class PackagePacker (View source)

Class to create archives from package source files.

Methods

process(PackageInfo $packageInfo, array $filters, array $writers)

Apply the filters and the writers to the package described by $packageInfo.

generateFileList(string $packageDirectory, string $directoryToParse, array $filters)

Generate the list of files/directories applying the filters specified.

applyFilters(string $packageDirectory, SplFileInfo $source, array $filters)

Apply the filters to a file found in the package directory or in one of its sub-directories.

Details

process(PackageInfo $packageInfo, array $filters, array $writers)

Apply the filters and the writers to the package described by $packageInfo.

Parameters

PackageInfo $packageInfo
array $filters
array $writers

Exceptions

RuntimeException

protected PackerFile[]|Generator generateFileList(string $packageDirectory, string $directoryToParse, array $filters)

Generate the list of files/directories applying the filters specified.

Parameters

string $packageDirectory

the path to the package root directory

string $directoryToParse

the path to be analyzed

array $filters

the filters to be applied

Return Value

PackerFile[]|Generator

protected PackerFile[] applyFilters(string $packageDirectory, SplFileInfo $source, array $filters)

Apply the filters to a file found in the package directory or in one of its sub-directories.

Parameters

string $packageDirectory

the path to the package root directory

SplFileInfo $source

the file to be processes

array $filters

the filters to be applied

Return Value

PackerFile[]