PHP Class Pantheon\Terminus\Commands\Remote\SSHBaseCommand

Inheritance: extends Pantheon\Terminus\Commands\TerminusCommand, implements Pantheon\Terminus\Site\SiteAwareInterface, use trait Pantheon\Terminus\Site\SiteAwareTrait
Show file Open project: pantheon-systems/terminus

Protected Properties

Property Type Description
$command Name of the command to be run as it will be used on server
$unavailable_commands A hash of commands which do not work using Terminus. The key is the native command, and the value is the Terminus equivalent which is optional.
$valid_frameworks array

Protected Methods

Method Description
executeCommand ( array $command_args ) : string Execute the command remotely
prepareEnvironment ( string $site_env_id ) Define the environment and site properties
validateCommand ( array $command ) : boolean Validates the command as available
validateConnectionMode ( string $mode ) Validates that the environment is using the correct connection mode
validateEnvironment ( Site $site, Environment $environment ) Validates that the environment's connection mode is appropriately set
validateFramework ( string $framework ) Validates the framework being used

Private Methods

Method Description
getCommandLine ( string $command_args ) : string Gets the command-line args

Method Details

executeCommand() protected method

Execute the command remotely
protected executeCommand ( array $command_args ) : string
$command_args array
return string

prepareEnvironment() protected method

Define the environment and site properties
protected prepareEnvironment ( string $site_env_id )
$site_env_id string The site/env to retrieve in . format

validateCommand() protected method

Validates the command as available
protected validateCommand ( array $command ) : boolean
$command array
return boolean

validateConnectionMode() protected method

Validates that the environment is using the correct connection mode
protected validateConnectionMode ( string $mode )
$mode string

validateEnvironment() protected method

Validates that the environment's connection mode is appropriately set
protected validateEnvironment ( Site $site, Environment $environment )
$site Site
$environment Environment

validateFramework() protected method

Validates the framework being used
protected validateFramework ( string $framework )
$framework string

Property Details

$command protected property

Name of the command to be run as it will be used on server
protected $command

$unavailable_commands protected property

A hash of commands which do not work using Terminus. The key is the native command, and the value is the Terminus equivalent which is optional.
protected $unavailable_commands

$valid_frameworks protected property

protected array $valid_frameworks
return array