Property | Type | Description | |
---|---|---|---|
$cli | League\CLImate\CLImate | ||
$copyDirs | array | ||
$currentlyDeploying | string | Keep track of which server we are currently deploying to. | |
$dotRevisionFilename | string | The name of the file on remote servers that stores the current revision hash. | |
$filesToExclude | array | A list of files that should NOT be uploaded to the named server. | |
$filesToInclude | A list of patterns that a file MUST match to be uploaded to the remote server. | ||
$git | |||
$globalFilesToExclude | array | A list of files that should NOT be uploaded to any of the servers. | |
$hooks | array | ||
$iniFilename | string | The filename from which to read remote server details. | |
$localRevision | string | ||
$passFile | string | The filename from which to read server password. | |
$postDeploy | array | ||
$postDeployRemote | array | ||
$preDeploy | array | ||
$preDeployRemote | array | ||
$purgeDirs | array | ||
$revision | string | ||
$scanSubSubmodules | boolean | If you need support for sub-submodules, ensure this is set to TRUE Set to false when the --exclude-subsubmodules command line option is used. | |
$scanSubmodules | boolean | To activate submodule deployment use the --submodules argument. | |
$servers | array | ||
$submodules | array |
Property | Type | Description | |
---|---|---|---|
$connection | League\Flysystem\Filesystem; | ||
$currentSubmoduleName | boolean | string | ||
$debug | boolean | Whether to print extra debugging info to the console, especially for git & FTP commands Activated using --debug command line option. | |
$defaultServer | boolean | Keep track of if a default server has been configured. | |
$deployAll | Weather the --all command line option was given. | ||
$deploymentSize | integer | Keep track of current deployment size. | |
$dotRevision | string | Holds the path to the .revision file For the main repository this will be the value of $dotRevisionFilename ('.revision' by default) but for submodules, the submodule path will be prepended. | |
$init | Whether the --init command line option was given. | ||
$listFiles | boolean | Whether phploy is running in list mode (--list or -l commands). | |
$mainRepo | string | ||
$repo | string | ||
$server | string | ||
$sync | boolean | Whether the --sync command line option was given. | |
$version | string |
Method | Description | |
---|---|---|
__construct ( ) | Constructor. | |
checkSubSubmodules ( string $repo, string $name ) | Check for sub-submodules. | |
checkSubmodules ( string $repo ) | Check for submodules. | |
compare ( string $localRevision ) : array | Compare revisions and returns array of files to upload:. | |
copy ( $copyDirs ) | Copy given directory's contents. | |
debug ( string $message ) | Helper method to output messages to the console (only in debug mode) Debug mode is activated by setting $this->debug = true or using the command line option --debug. | |
deploy ( ) | Deploy (or list) changed files. | |
directoryToArray ( string $directory, boolean $recursive = true, boolean $listDirs = false, boolean $listFiles = true, string $exclude = '' ) : array | Get an array that represents directory tree Credit: http://php.net/manual/en/function.scandir.php#109140. | |
executeOnRemoteServer ( array $commands ) | ||
getPasswordFile ( ) : string | Returns the full path to password file. | |
getPasswordFromIniFile ( string $servername ) : string | Try to fetch password from .phploy file if not found, an empty string will be returned. | |
hasDeletedDirectories ( array $filesToDelete ) : array | Checks for deleted directories. Git cares only about files. | |
humanFilesize ( integer $bytes, integer $decimals = 2 ) : string | Return a human readable filesize. | |
listFiles ( array $files ) | Check what files will be uploaded/deleted. | |
parseIniFile ( string $iniFile ) : array | Parse an ini file and return values as array. | |
patternMatch ( string $pattern, string $string ) : string | Glob the file path. | |
postDeploy ( array $commands ) | Execute post commands. | |
postDeployRemote ( array $commands ) | Execute post commands on remote server. | |
preDeploy ( array $commands ) | Execute pre commands. | |
preDeployRemote ( array $commands ) | Execute pre commands on remote server. | |
prepareServers ( ) | Reads the phploy.ini file and populates the $this->servers array. | |
purge ( $purgeDirs ) | Purge given directory's contents. | |
push ( array $files, $localRevision = null ) | Update the current remote server with the array of files provided. | |
setRevision ( $localRevision = null ) | Sets revision on the server. | |
setup ( ) | Setup CLI options. |
Method | Description | |
---|---|---|
createSampleIniFile ( ) | Creates sample ini file. | |
log ( string $message, string $type = 'INFO' ) | Log a message to file. | |
relPath ( string $el ) : string | Strip Absolute Path. |
Method | Description | |
---|---|---|
currentBranch ( ) : string | Gets the current branch name. | |
currentRevision ( ) : string | Get current revision. | |
filterIgnoredFiles ( array $files ) : array | Filter ignore files. | |
filterIncludedFiles ( array $files ) : array | Filter included files. | |
getPassword ( ) : string | Gets the password from user input, hiding password and replaces it with stars (*) if user users Unix / Mac. |
public checkSubSubmodules ( string $repo, string $name ) | ||
$repo | string | |
$name | string |
public checkSubmodules ( string $repo ) | ||
$repo | string |
public directoryToArray ( string $directory, boolean $recursive = true, boolean $listDirs = false, boolean $listFiles = true, string $exclude = '' ) : array | ||
$directory | string | Directory path |
$recursive | boolean | Include sub directories |
$listDirs | boolean | Include directories on listing |
$listFiles | boolean | Include files on listing |
$exclude | string | Exclude paths that matches this regex |
return | array |
public executeOnRemoteServer ( array $commands ) | ||
$commands | array |
public getPasswordFile ( ) : string | ||
return | string |
public getPasswordFromIniFile ( string $servername ) : string | ||
$servername | string | Server to fetch password for |
return | string |
public hasDeletedDirectories ( array $filesToDelete ) : array | ||
$filesToDelete | array | |
return | array |
public parseIniFile ( string $iniFile ) : array | ||
$iniFile | string | |
return | array |
public postDeploy ( array $commands ) | ||
$commands | array |
public postDeployRemote ( array $commands ) | ||
$commands | array |
public preDeployRemote ( array $commands ) | ||
$commands | array |
public prepareServers ( ) |
public setRevision ( $localRevision = null ) |
protected Filesystem;,League\Flysystem $connection | ||
return | League\Flysystem\Filesystem; |
public string $currentlyDeploying | ||
return | string |
protected bool $debug | ||
return | boolean |
protected bool $defaultServer | ||
return | boolean |
protected int $deploymentSize | ||
return | integer |
protected string $dotRevision | ||
return | string |
public string $dotRevisionFilename | ||
return | string |
public array $filesToExclude | ||
return | array |
public $filesToInclude |
public array $globalFilesToExclude | ||
return | array |
public string $iniFilename | ||
return | string |
protected bool $listFiles | ||
return | boolean |
public string $passFile | ||
return | string |
public bool $scanSubSubmodules | ||
return | boolean |
public bool $scanSubmodules | ||
return | boolean |
protected bool $sync | ||
return | boolean |