PHP Класс PackageGenerator

A package file is a .tar.gz file of the project, ready to be uploaded to the server These package generators can be used by applicable deployment backends.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cache

Открытые методы

Метод Описание
generatePackage ( string $sha, string $baseDir, $outputFilename, DeploynautLogFile $log ) : boolean Generate the package file, saving to the given location
getCache ( )
getIdentifier ( ) Return a string that uniquely identifies this package generator.
getPackageFilename ( string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string Generate or retrieve a package from the cache
setCache ( PackageCache $cache )

Описание методов

generatePackage() абстрактный публичный Метод

Generate the package file, saving to the given location
abstract public generatePackage ( string $sha, string $baseDir, $outputFilename, DeploynautLogFile $log ) : boolean
$sha string
$baseDir string string The base directory of the project, checked out from git.
$outputFilename string The filename to write to.
$log DeploynautLogFile
Результат boolean True on success

getCache() публичный Метод

public getCache ( )

getIdentifier() абстрактный публичный Метод

This will be used as part of cache keys; if meaningful changes to the operation of the generator are made, then the identifier should change. Note there is no need to include the classname in the identifier; callers to getIdentifier() should be responsible for disambiguating based on class.
abstract public getIdentifier ( )

getPackageFilename() публичный Метод

Generate or retrieve a package from the cache
public getPackageFilename ( string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string
$identifier string A unique identifier for the generator; used to partition the cache
$sha string The SHA of the commit to be deployed
$repositoryDir string The directory where the repository resides
$log DeploynautLogFile The log to write status output to, including package-generation commands
Результат string

setCache() публичный Метод

public setCache ( PackageCache $cache )
$cache PackageCache

Описание свойств

$cache защищенное свойство

protected $cache