PHP Class Platformsh\Cli\Command\Tunnel\TunnelCommandBase

Inheritance: extends Platformsh\Cli\Command\CommandBase
Show file Open project: commerceguys/platform-cli

Protected Properties

Property Type Description
$canBeRunMultipleTimes
$tunnelInfo

Public Methods

Method Description
checkSupport ( )

Protected Methods

Method Description
closeTunnel ( array $tunnel ) : boolean Close an open tunnel.
createTunnelProcess ( string $url, string $remoteHost, integer $remotePort, integer $localPort, array $extraArgs = [] ) : Process
filterTunnels ( array $tunnels, Symfony\Component\Console\Input\InputInterface $input ) : array Filter a list of tunnels by the currently selected project/environment.
formatTunnelRelationship ( array $tunnel ) : string Format a tunnel's relationship as a string.
getPidFile ( array $tunnel ) : string
getPort ( integer $default = 30000 ) : integer Automatically determine the best port for a new tunnel.
getTunnelInfo ( boolean $open = true ) : array Get info on currently open tunnels.
getTunnelKey ( array $tunnel ) : string
isTunnelOpen ( array $tunnel ) : boolean | array Check whether a tunnel is already open.
openLog ( string $logFile ) : Symfony\Component\Console\Output\OutputInterface | false
saveTunnelInfo ( )
tunnelsAreEqual ( array $tunnel1, array $tunnel2 ) : boolean

Method Details

checkSupport() public method

public checkSupport ( )

closeTunnel() protected method

Close an open tunnel.
protected closeTunnel ( array $tunnel ) : boolean
$tunnel array
return boolean True on success, false on failure.

createTunnelProcess() protected method

protected createTunnelProcess ( string $url, string $remoteHost, integer $remotePort, integer $localPort, array $extraArgs = [] ) : Process
$url string
$remoteHost string
$remotePort integer
$localPort integer
$extraArgs array
return Symfony\Component\Process\Process

filterTunnels() protected method

Filter a list of tunnels by the currently selected project/environment.
protected filterTunnels ( array $tunnels, Symfony\Component\Console\Input\InputInterface $input ) : array
$tunnels array
$input Symfony\Component\Console\Input\InputInterface
return array

formatTunnelRelationship() protected method

Format a tunnel's relationship as a string.
protected formatTunnelRelationship ( array $tunnel ) : string
$tunnel array
return string

getPidFile() protected method

protected getPidFile ( array $tunnel ) : string
$tunnel array
return string

getPort() protected method

Automatically determine the best port for a new tunnel.
protected getPort ( integer $default = 30000 ) : integer
$default integer
return integer

getTunnelInfo() protected method

Get info on currently open tunnels.
protected getTunnelInfo ( boolean $open = true ) : array
$open boolean
return array

getTunnelKey() protected method

protected getTunnelKey ( array $tunnel ) : string
$tunnel array
return string

isTunnelOpen() protected method

Check whether a tunnel is already open.
protected isTunnelOpen ( array $tunnel ) : boolean | array
$tunnel array
return boolean | array

openLog() protected method

protected openLog ( string $logFile ) : Symfony\Component\Console\Output\OutputInterface | false
$logFile string
return Symfony\Component\Console\Output\OutputInterface | false

saveTunnelInfo() protected method

protected saveTunnelInfo ( )

tunnelsAreEqual() protected method

protected tunnelsAreEqual ( array $tunnel1, array $tunnel2 ) : boolean
$tunnel1 array
$tunnel2 array
return boolean

Property Details

$canBeRunMultipleTimes protected property

protected $canBeRunMultipleTimes

$tunnelInfo protected property

protected $tunnelInfo