Property | Type | Description | |
---|---|---|---|
$config | |||
$fs | |||
$projectConfigs |
Method | Description | |
---|---|---|
__construct ( |
||
ensureGitRemote ( string $dir, string $url ) | Ensure there are appropriate Git remotes in the repository. | |
ensureLocalDir ( string $projectRoot ) | ||
getLegacyProjectRoot ( ) : string | false | Find the legacy root of the current project, from CLI versions <3. | |
getProjectConfig ( string $projectRoot = null ) : array | null | Get the configuration for the current project. | |
getProjectRoot ( ) : string | false | Find the root of the current project. | |
writeCurrentProjectConfig ( array $config, string $projectRoot = null, boolean $merge = false ) : array | Write configuration for a project. | |
writeGitExclude ( string $dir ) | Write to the Git exclude file. |
Method | Description | |
---|---|---|
findTopDirectoryContaining ( string $file, callable $callback = null ) : string | false | Find the highest level directory that contains a file. | |
getGitRemoteUrl ( string $dir ) : string | false | ||
parseGitUrl ( string $gitUrl ) : array | false |
public __construct ( |
||
$config |
public ensureGitRemote ( string $dir, string $url ) | ||
$dir | string | |
$url | string |
protected static findTopDirectoryContaining ( string $file, callable $callback = null ) : string | false | ||
$file | string | The filename to look for. |
$callback | callable | A callback to validate the directory when found. Accepts one argument (the directory path). Return true to use the directory, or false to continue traversing upwards. |
return | string | false | The path to the directory, or false if the file is not found. |
protected getGitRemoteUrl ( string $dir ) : string | false | ||
$dir | string | |
return | string | false | The Git remote URL. |
public getLegacyProjectRoot ( ) : string | false | ||
return | string | false |
public getProjectRoot ( ) : string | false | ||
return | string | false |
protected parseGitUrl ( string $gitUrl ) : array | false | ||
$gitUrl | string | |
return | array | false | An array containing 'id' and 'host', or false on failure. |
public writeGitExclude ( string $dir ) | ||
$dir | string |