PHP Class Deployment\Deployer

Mostra file Open project: dg/ftp-deployment Class Usage Examples

Public Properties

Property Type Description
$allowDelete boolean
$deploymentFile string
$ignoreMasks string[]
$preprocessMasks string[]
$runAfter of string|callable
$runAfterUpload of string|callable
$runBefore of string|callable
$tempDir string
$testMode boolean
$toPurge relative paths

Public Methods

Method Description
__construct ( deployment\Server $server, $localDir, Logger $logger )
addFilter ( $extension, $filter, $cached = FALSE ) : void Appends preprocessor for files.
collectPaths ( $subdir = '' ) : string[] Scans directory.
deploy ( ) : void Synchronize remote and local.
writeDeploymentFile ( $localPaths ) : string Prepares .htdeployment for upload.

Private Methods

Method Description
deletePaths ( array $paths ) : void Deletes files and directories.
loadDeploymentFile ( ) : string[] | null Downloads and decodes .htdeployment from the server.
preprocess ( $file ) : string Calls preprocessors on file.
renamePaths ( array $paths ) : void Renames uploaded files.
runJobs ( array $jobs ) : void
uploadPaths ( array $paths ) : void Uploades files and creates directories.
writeProgress ( $count, $total, $path, $percent = NULL, $color = NULL )

Method Details

__construct() public method

public __construct ( deployment\Server $server, $localDir, Logger $logger )
$server deployment\Server
$logger Logger

addFilter() public method

Appends preprocessor for files.
public addFilter ( $extension, $filter, $cached = FALSE ) : void
return void

collectPaths() public method

Scans directory.
public collectPaths ( $subdir = '' ) : string[]
return string[] relative paths, starts with /

deploy() public method

Synchronize remote and local.
public deploy ( ) : void
return void

writeDeploymentFile() public method

Prepares .htdeployment for upload.
public writeDeploymentFile ( $localPaths ) : string
return string

Property Details

$allowDelete public_oe property

public bool $allowDelete
return boolean

$deploymentFile public_oe property

public string $deploymentFile
return string

$ignoreMasks public_oe property

public string[] $ignoreMasks
return string[]

$preprocessMasks public_oe property

public string[] $preprocessMasks
return string[]

$runAfter public_oe property

of string|callable
public $runAfter

$runAfterUpload public_oe property

of string|callable
public $runAfterUpload

$runBefore public_oe property

of string|callable
public $runBefore

$tempDir public_oe property

public string $tempDir
return string

$testMode public_oe property

public bool $testMode
return boolean

$toPurge public_oe property

relative paths
public $toPurge