PHP Class Platformsh\Cli\Command\CompletionCommand

Inheritance: extends Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand, implements Platformsh\Cli\Command\CanHideInListInterface
Show file Open project: commerceguys/platform-cli

Protected Properties

Property Type Description
$api Platformsh\Cli\Api
$projects array A list of the user's projects.
$welcomeCommand CommandBase

Public Methods

Method Description
getAppNames ( ) : string[] Get a list of application names in the local project.
getEnvironments ( ) : string[] Get a list of environment IDs.
getEnvironmentsForCheckout ( ) : string[] Get a list of environments IDs that can be checked out.
getUserEmails ( ) : string[] Get a list of user email addresses.
isHiddenInList ( )

Protected Methods

Method Description
getProject ( ) : Platformsh\Client\Model\Project | false Get the preferred project for autocompletion.
getProjectIdFromCommandLine ( string $commandLine ) : string | false Get the project ID the user has already entered on the command line.
runCompletion ( )
setUp ( )

Method Details

getAppNames() public method

Get a list of application names in the local project.
public getAppNames ( ) : string[]
return string[]

getEnvironments() public method

Get a list of environment IDs.
public getEnvironments ( ) : string[]
return string[]

getEnvironmentsForCheckout() public method

Get a list of environments IDs that can be checked out.
public getEnvironmentsForCheckout ( ) : string[]
return string[]

getProject() protected method

The project is either defined by an ID that the user has specified in the command (via the 'id' argument of 'get', or the '--project' option), or it is determined from the current path.
protected getProject ( ) : Platformsh\Client\Model\Project | false
return Platformsh\Client\Model\Project | false

getProjectIdFromCommandLine() protected method

Get the project ID the user has already entered on the command line.
protected getProjectIdFromCommandLine ( string $commandLine ) : string | false
$commandLine string
return string | false

getUserEmails() public method

Get a list of user email addresses.
public getUserEmails ( ) : string[]
return string[]

isHiddenInList() public method

public isHiddenInList ( )

runCompletion() protected method

protected runCompletion ( )

setUp() protected method

protected setUp ( )

Property Details

$api protected property

protected Api,Platformsh\Cli $api
return Platformsh\Cli\Api

$projects protected property

A list of the user's projects.
protected array $projects
return array

$welcomeCommand protected property

protected CommandBase,Platformsh\Cli\Command $welcomeCommand
return CommandBase