PHP 클래스 Platformsh\Cli\Local\LocalProject

파일 보기 프로젝트 열기: commerceguys/platform-cli 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config
$fs
$projectConfigs

공개 메소드들

메소드 설명
__construct ( CliConfig $config = null )
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.

보호된 메소드들

메소드 설명
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

메소드 상세

__construct() 공개 메소드

public __construct ( CliConfig $config = null )
$config Platformsh\Cli\CliConfig

ensureGitRemote() 공개 메소드

Ensure there are appropriate Git remotes in the repository.
public ensureGitRemote ( string $dir, string $url )
$dir string
$url string

ensureLocalDir() 공개 메소드

public ensureLocalDir ( string $projectRoot )
$projectRoot string

findTopDirectoryContaining() 보호된 정적인 메소드

Find the highest level directory that contains a file.
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.
리턴 string | false The path to the directory, or false if the file is not found.

getGitRemoteUrl() 보호된 메소드

protected getGitRemoteUrl ( string $dir ) : string | false
$dir string
리턴 string | false The Git remote URL.

getLegacyProjectRoot() 공개 메소드

Find the legacy root of the current project, from CLI versions <3.
public getLegacyProjectRoot ( ) : string | false
리턴 string | false

getProjectConfig() 공개 메소드

Get the configuration for the current project.
public getProjectConfig ( string $projectRoot = null ) : array | null
$projectRoot string
리턴 array | null The current project's configuration.

getProjectRoot() 공개 메소드

Find the root of the current project.
public getProjectRoot ( ) : string | false
리턴 string | false

parseGitUrl() 보호된 메소드

protected parseGitUrl ( string $gitUrl ) : array | false
$gitUrl string
리턴 array | false An array containing 'id' and 'host', or false on failure.

writeCurrentProjectConfig() 공개 메소드

Configuration is stored as YAML, in the location configured by 'local.project_config'.
public writeCurrentProjectConfig ( array $config, string $projectRoot = null, boolean $merge = false ) : array
$config array The configuration.
$projectRoot string The project root.
$merge boolean Whether to merge with existing configuration.
리턴 array The updated project configuration.

writeGitExclude() 공개 메소드

Write to the Git exclude file.
public writeGitExclude ( string $dir )
$dir string

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected $config

$fs 보호되어 있는 프로퍼티

protected $fs

$projectConfigs 보호되어 있는 정적으로 프로퍼티

protected static $projectConfigs