PHP 클래스 Platformsh\Cli\Command\CommandBase

상속: extends Symfony\Component\Console\Command\Command, implements Platformsh\Cli\Command\CanHideInListInterface, use trait Platformsh\Cli\Command\HasExamplesTrait
파일 보기 프로젝트 열기: commerceguys/platform-cli 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$canBeRunMultipleTimes
$config Platformsh\Cli\CliConfig
$envArgName
$hiddenInList
$interactive boolean
$local
$localProject Platformsh\Cli\Local\LocalProject | null
$output Symfony\Component\Console\Output\OutputInterface | null
$runningViaMulti
$stdErr Symfony\Component\Console\Output\OutputInterface | null

공개 메소드들

메소드 설명
__construct ( $name = null )
canBeRunMultipleTimes ( )
getCurrentEnvironment ( Platformsh\Client\Model\Project $expectedProject = null, boolean | null $refresh = null ) : Platformsh\Client\Model\Environment | false Get the current environment if the user is in a project directory.
getCurrentProject ( ) : Platformsh\Client\Model\Project | false Get the current project if the user is in a project directory.
getHelper ( $name )
getProcessedHelp ( )
getProjectRoot ( ) : string | false
getSynopsis ( $short = false )
getVisibleAliases ( ) : array Get aliases that should be visible in help.
isHiddenInList ( )
isLocal ( ) : boolean Is this a local command? (if it does not make API requests)
login ( ) Log in the user.
setRunningViaMulti ( $runningViaMulti = true )
updateDrushAliases ( EnvironmentsChangedEvent $event ) Update the user's local Drush aliases.

보호된 메소드들

메소드 설명
addAppOption ( ) : CommandBase Add the --app option.
addEnvironmentOption ( ) : CommandBase Add the --environment option.
addNoWaitOption ( string $description = 'Do not wait for the operation to complete' ) : CommandBase Add the --no-wait option.
addProjectOption ( ) : CommandBase Add the --project and --host options.
api ( ) : Api Set up the API object.
checkUpdates ( boolean $reset = false ) Check for updates.
debug ( string $message ) Print a message if debug output is enabled.
getHomeDir ( ) : string
getSelectedEnvironment ( ) : Platformsh\Client\Model\Environment Get the environment selected by the user.
getSelectedProject ( ) : Platformsh\Client\Model\Project Get the project selected by the user.
getSessionsDir ( ) : string
hasSelectedEnvironment ( ) : boolean Check whether a single environment is selected.
hasSelectedProject ( ) : boolean Check whether a project is selected.
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
isTerminal ( Symfony\Component\Console\Output\OutputInterface $output ) : boolean Detect automatically whether the output is a TTY terminal.
parseProjectId ( string $url ) : array Parse the project ID and possibly other details from a provided URL.
promptLegacyMigrate ( ) Prompt the user to migrate from the legacy project file structure.
rebuildWarning ( ) Warn the user that the remote environment needs rebuilding.
runOtherCommand ( string $name, array $arguments = [], Symfony\Component\Console\Output\OutputInterface $output = null ) : integer Run another CLI command.
selectApp ( Symfony\Component\Console\Input\InputInterface $input, callable $filter = null ) : string | null Find the name of the app the user wants to use for an SSH command.
selectEnvironment ( string | null $environmentId = null ) : Platformsh\Client\Model\Environment Select the current environment for the user.
selectProject ( string $projectId = null, string $host = null ) : Platformsh\Client\Model\Project Select the project for the user, based on input or the environment.
selectedProjectIsCurrent ( ) : boolean
setHiddenAliases ( array $hiddenAliases ) : CommandBase Add aliases that should be hidden from help.
setProjectRoot ( string $root )
validateInput ( Symfony\Component\Console\Input\InputInterface $input, boolean $envNotRequired = false )

메소드 상세

__construct() 공개 메소드

public __construct ( $name = null )

addAppOption() 보호된 메소드

Add the --app option.
protected addAppOption ( ) : CommandBase
리턴 CommandBase

addEnvironmentOption() 보호된 메소드

Add the --environment option.
protected addEnvironmentOption ( ) : CommandBase
리턴 CommandBase

addNoWaitOption() 보호된 메소드

Add the --no-wait option.
protected addNoWaitOption ( string $description = 'Do not wait for the operation to complete' ) : CommandBase
$description string
리턴 CommandBase

addProjectOption() 보호된 메소드

Add the --project and --host options.
protected addProjectOption ( ) : CommandBase
리턴 CommandBase

api() 보호된 메소드

Set up the API object.
protected api ( ) : Api
리턴 Platformsh\Cli\Api

canBeRunMultipleTimes() 공개 메소드

checkUpdates() 보호된 메소드

Check for updates.
protected checkUpdates ( boolean $reset = false )
$reset boolean

debug() 보호된 메소드

Print a message if debug output is enabled.
protected debug ( string $message )
$message string

getCurrentEnvironment() 공개 메소드

Get the current environment if the user is in a project directory.
public getCurrentEnvironment ( Platformsh\Client\Model\Project $expectedProject = null, boolean | null $refresh = null ) : Platformsh\Client\Model\Environment | false
$expectedProject Platformsh\Client\Model\Project The expected project.
$refresh boolean | null Whether to refresh the environments or projects cache.
리턴 Platformsh\Client\Model\Environment | false The current environment.

getCurrentProject() 공개 메소드

Get the current project if the user is in a project directory.
public getCurrentProject ( ) : Platformsh\Client\Model\Project | false
리턴 Platformsh\Client\Model\Project | false The current project

getHelper() 공개 메소드

public getHelper ( $name )

getHomeDir() 보호된 메소드

protected getHomeDir ( ) : string
리턴 string

getProcessedHelp() 공개 메소드

Overrides the default method so that the description is not repeated twice.
public getProcessedHelp ( )

getProjectRoot() 공개 메소드

public getProjectRoot ( ) : string | false
리턴 string | false

getSelectedEnvironment() 보호된 메소드

The project is selected via validateInput(), if there is an --environment option in the command.
protected getSelectedEnvironment ( ) : Platformsh\Client\Model\Environment
리턴 Platformsh\Client\Model\Environment

getSelectedProject() 보호된 메소드

The project is selected via validateInput(), if there is a --project option in the command.
protected getSelectedProject ( ) : Platformsh\Client\Model\Project
리턴 Platformsh\Client\Model\Project

getSessionsDir() 보호된 메소드

protected getSessionsDir ( ) : string
리턴 string

getSynopsis() 공개 메소드

public getSynopsis ( $short = false )

getVisibleAliases() 공개 메소드

Get aliases that should be visible in help.
public getVisibleAliases ( ) : array
리턴 array

hasSelectedEnvironment() 보호된 메소드

Check whether a single environment is selected.
protected hasSelectedEnvironment ( ) : boolean
리턴 boolean

hasSelectedProject() 보호된 메소드

Check whether a project is selected.
protected hasSelectedProject ( ) : boolean
리턴 boolean

initialize() 보호된 메소드

protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

interact() 보호된 메소드

protected interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

isHiddenInList() 공개 메소드

public isHiddenInList ( )

isLocal() 공개 메소드

Is this a local command? (if it does not make API requests)
public isLocal ( ) : boolean
리턴 boolean

isTerminal() 보호된 메소드

Detect automatically whether the output is a TTY terminal.
protected isTerminal ( Symfony\Component\Console\Output\OutputInterface $output ) : boolean
$output Symfony\Component\Console\Output\OutputInterface
리턴 boolean

login() 공개 메소드

This is called via the 'login_required' event.
또한 보기: Api::getClient()
public login ( )

parseProjectId() 보호된 메소드

Parse the project ID and possibly other details from a provided URL.
protected parseProjectId ( string $url ) : array
$url string A web UI, API, or public URL of the project.
리턴 array An array of containing at least a 'projectId'. Keys 'host', 'environmentId', and 'appId' will be either null or strings.

promptLegacyMigrate() 보호된 메소드

If the input is interactive, the user will be asked to migrate up to once per hour. The time they were last asked will be stored in the project configuration. If the input is not interactive, the user will be warned (on every command run) that they should run the 'legacy-migrate' command.
protected promptLegacyMigrate ( )

rebuildWarning() 보호된 메소드

Warn the user that the remote environment needs rebuilding.
protected rebuildWarning ( )

runOtherCommand() 보호된 메소드

Run another CLI command.
protected runOtherCommand ( string $name, array $arguments = [], Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
$name string The name of the other command.
$arguments array Arguments for the other command.
$output Symfony\Component\Console\Output\OutputInterface The output for the other command. Defaults to the current output.
리턴 integer

selectApp() 보호된 메소드

Find the name of the app the user wants to use for an SSH command.
protected selectApp ( Symfony\Component\Console\Input\InputInterface $input, callable $filter = null ) : string | null
$input Symfony\Component\Console\Input\InputInterface The user input object.
$filter callable A filter callback that takes one argument: a LocalApplication object.
리턴 string | null The application name, or null if it could not be found.

selectEnvironment() 보호된 메소드

Select the current environment for the user.
protected selectEnvironment ( string | null $environmentId = null ) : Platformsh\Client\Model\Environment
$environmentId string | null The environment ID specified by the user, or null to auto-detect the environment.
리턴 Platformsh\Client\Model\Environment

selectProject() 보호된 메소드

Select the project for the user, based on input or the environment.
protected selectProject ( string $projectId = null, string $host = null ) : Platformsh\Client\Model\Project
$projectId string
$host string
리턴 Platformsh\Client\Model\Project

selectedProjectIsCurrent() 보호된 메소드

protected selectedProjectIsCurrent ( ) : boolean
리턴 boolean

setHiddenAliases() 보호된 메소드

Add aliases that should be hidden from help.
또한 보기: parent::setAliases()
protected setHiddenAliases ( array $hiddenAliases ) : CommandBase
$hiddenAliases array
리턴 CommandBase

setProjectRoot() 보호된 메소드

protected setProjectRoot ( string $root )
$root string

setRunningViaMulti() 공개 메소드

public setRunningViaMulti ( $runningViaMulti = true )

updateDrushAliases() 공개 메소드

This is called via the 'environments_changed' event.
또한 보기: Api::getEnvironments()
public updateDrushAliases ( EnvironmentsChangedEvent $event )
$event Platformsh\Cli\Event\EnvironmentsChangedEvent

validateInput() 보호된 메소드

protected validateInput ( Symfony\Component\Console\Input\InputInterface $input, boolean $envNotRequired = false )
$input Symfony\Component\Console\Input\InputInterface
$envNotRequired boolean

프로퍼티 상세

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

protected $canBeRunMultipleTimes

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

protected static CliConfig,Platformsh\Cli $config
리턴 Platformsh\Cli\CliConfig

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

protected $envArgName

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

protected $hiddenInList

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

protected static bool $interactive
리턴 boolean

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

protected $local

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

protected LocalProject,Platformsh\Cli\Local|null $localProject
리턴 Platformsh\Cli\Local\LocalProject | null

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

protected OutputInterface,Symfony\Component\Console\Output|null $output
리턴 Symfony\Component\Console\Output\OutputInterface | null

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

protected $runningViaMulti

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

protected OutputInterface,Symfony\Component\Console\Output|null $stdErr
리턴 Symfony\Component\Console\Output\OutputInterface | null